When local councilors adopted a resolution two years ago declaring their small town in southeastern Poland “free of L.G.B.T.,” the mayor didn’t see much harm in what appeared to be a symbolic and legally pointless gesture. Today, he’s scrambling to contain the damage. What initially seemed a cost-free sop to conservatives in the rural and religiously devout Polish borderlands next to Ukraine, the May 2019 decision has become a costly embarrassment for the town of Krasnik. It has jeopardized millions of dollars in foreign funding and, Mayor Wojciech Wilk said, turned “our town into a synonym for homophobia,” which he insisted was not accurate. A French town last year severed a partnership with Krasnik in protest. And Norway, from which the mayor had hoped to get nearly $10 million starting this year to finance development projects, said in September that it would not give grants to any Polish town that declares itself “free of L.G.B.T.” “We have become Europe’s laughingstock, and it’s the citizens not the local politicians who’ve suffered most,” lamented Mr. Wilk, who is now lobbying councilors to repeal the resolution that put the town’s 32,000 residents in the middle of a raucous debate over traditional and modern values.