I am going to give the obvious possible answer: "The Shadow Over Innsmouth" a novella by H. P. Lovecraft, one of the most notable stories in the Cthulhu Mythos. It was written in 1931 but not published until 1936. In concerns the titular town, which has been taken over by a dangerous cult and is avoided by people from all the surrounding communities.
It takes place in New England (actually in a fairly identifiable location in Massachusetts, although there is not really a town there). From the first chapter (as are all the quotes I have provided):
I never heard of Innsmouth till the day before I saw it for the first and—so far—last time. I was celebrating my coming of age by a tour of New England—sightseeing, antiquarian, and genealogical—and had planned to go directly from ancient Newburyport to Arkham, whence my mother’s family was derived. I had no car, but was travelling by train, trolley, and motor-coach, always seeking the cheapest possible route. In Newburyport they told me that the steam train was the thing to take to Arkham; and it was only at the station ticket-office, when I demurred at the high fare, that I learned about Innsmouth. The stout, shrewd-faced agent, whose speech shewed him to be no local man, seemed sympathetic toward my efforts at economy, and made a suggestion that none of my other informants had offered.
“You could take that old bus, I suppose,” he said with a certain hesitation, “but it ain’t thought much of hereabouts. It goes through Innsmouth—you may have heard about that—and so the people don’t like it. Run by an Innsmouth fellow—Joe Sargent—but never gets any custom from here, or Arkham either, I guess. Wonder it keeps running at all. I s’pose it’s cheap enough, but I never see more’n two or three people in it—nobody but those Innsmouth folks. Leaves the Square—front of Hammond’s Drug Store—at 10 a.m. and 7 p.m. unless they’ve changed lately. Looks like a terrible rattletrap—I’ve never ben on it.”
That was the first I ever heard of shadowed Innsmouth. Any reference to a town not shewn on common maps or listed in recent guide-books would have interested me, and the agent’s odd manner of allusion roused something like real curiosity. A town able to inspire such dislike in its neighbours, I thought, must be at least rather unusual, and worthy of a tourist’s attention. If it came before Arkham I would stop off there—and so I asked the agent to tell me something about it. He was very deliberate, and spoke with an air of feeling slightly superior to what he said.
“Innsmouth? Well, it’s a queer kind of a town down at the mouth of the Manuxet. Used to be almost a city—quite a port before the War of 1812—but all gone to pieces in the last hundred years or so. No railroad now—B. & M. never went through, and the branch line from Rowley was given up years ago.
“More empty houses than there are people, I guess, and no business to speak of except fishing and lobstering. Everybody trades mostly here or in Arkham or Ipswich. Once they had quite a few mills, but nothing’s left now except one gold refinery running on the leanest kind of part time.
There are additional later (but still early mentions) of the declining economy of the town and how people avoid it.
“You ought to hear, though, what some of the old-timers tell about the black reef off the coast—Devil Reef, they call it. It’s well above water a good part of the time, and never much below it, but at that you could hardly call it an island. The story is that there’s a whole legion of devils seen sometimes on that reef—sprawled about, or darting in and out of some kind of caves near the top. It’s a rugged, uneven thing, a good bit over a mile out, and toward the end of shipping days sailors used to make big detours just to avoid it.
“That is, sailors that didn’t hail from Innsmouth. One of the things they had against old Captain Marsh was that he was supposed to land on it sometimes at night when the tide was right. Maybe he did, for I dare say the rock formation was interesting, and it’s just barely possible he was looking for pirate loot and maybe finding it; but there was talk of his dealing with daemons there. Fact is, I guess on the whole it was really the Captain that gave the bad reputation to the reef.
“That was before the big epidemic of 1846, when over half the folks in Innsmouth was carried off. They never did quite figure out what the trouble was, but it was probably some foreign kind of disease brought from China or somewhere by the shipping. It surely was bad enough—there was riots over it, and all sorts of ghastly doings that I don’t believe ever got outside of town—and it left the place in awful shape. Never came back—there can’t be more’n 300 or 400 people living there now.
...
“Nobody around here or in Arkham or Ipswich will have anything to do with ’em, and they act kind of offish themselves when they come to town or when anyone tries to fish on their grounds. Queer how fish are always thick off Innsmouth Harbour when there ain’t any anywhere else around—but just try to fish there yourself and see how the folks chase you off! Those people used to come here on the railroad—walking and taking the train at Rowley after the branch was dropped—but now they use that bus.
The Captain Marsh mentioned above is felt by all to have brought back many peculiar people, objects, and practices from Asia or the South Pacific, including a new religion.
As the good lady shewed me out of the building she made it clear that the pirate theory of the Marsh fortune was a popular one among the intelligent people of the region. Her own attitude toward shadowed Innsmouth—which she had never seen—was one of disgust at a community slipping far down the cultural scale, and she assured me that the rumours of devil-worship were partly justified by a peculiar secret cult which had gained force there and engulfed all the orthodox churches.
It was called, she said, “The Esoteric Order of Dagon”, and was undoubtedly a debased, quasi-pagan thing imported from the East a century before, at a time when the Innsmouth fisheries seemed to be going barren. Its persistence among a simple people was quite natural in view of the sudden and permanent return of abundantly fine fishing, and it soon came to be the greatest influence on the town, replacing Freemasonry altogether and taking up headquarters in the old Masonic Hall on New Church Green.
Even if "The Shadow Over Innsmouth" is not the story you are looking for, for anyone interested in the Cthulhu Mythos it is a must read. And if it's not the right story, the one you are looking for was very likely inspired by Lovecraft's.