The large two-charecter sign on top of the gate spells 節孝 (节孝), 'wife's fidelity.' The plaque below says: 故儒士应宽妻冯氏之坊, arch in honor of the woman surnamed Feng, the wife of the Confucian scholar Yingkuan (thanks go out to marenzhi for his expertise!) Two columns on both sides spell 'the 54th year of the reign of Qianlong,' or 1789.
It would be great if this beautiful arch was indeed in Shanghai. The walled city had almost three hundred of such gateways around the time this one was erected. By the end of the 19th century they were gradually torn down, to give way to wider roads, or because the wooden constructions were getting shabby.
Sadly, it appears this arch was not photographed in Shanghai. This blog investigation places it in Cixi County, in Zhejiang Province, names the exact street and concludes the arch has long been demolished.