I recall the Atlas of the DC Universe putting Gotham in New Jersey, but in the Young Justice universe (Earth-16), it's in Connecticut. The Gotham City of the '66 Batman sitcom was in Gotham State, and it was a blatant pastiche of NYC, with gag place names (Avenue of the Armenias), surrogates for NYC landmarks, and a mayor and governor named for those of New York City and State at the time (Mayor Linseed = Lindsay, Governor Stonefellow = Rockefeller), and its exteriors were routinely represented by stock footage of Manhattan.
Yeah, Gotham's been put all over the place in various media adaptations of it over the years. And in Batman: The Animated Series
, I seem to remember it was explicitly placed on a map as being where New York City is found. But when I was active in online Batman
fandom about 12 years ago, the general fan consensus -- and this was not canonical or definitive; it was just what most of fandom seemed to agree upon -- was that it's in New Jersey. A cursory look at the Batman Wiki's entry on Gotham City
would seem to indicate that that's still the fandom consensus. In fact, a user named "Doomlurker" adapted the map of Gotham DC Comics created for their No Man's Land
arc in 1999 by adding it to a Google Maps image of New Jersey, placing Gotham in Atlantic County in Southern New Jersey, near the Great Bay. I'll put it in spoiler tag so that it doesn't stretch the screen.