Gotham City was named by Batman writer Bill Finger. When he was asked about how he chose the name “Gotham” and why he didn’t just use New York City, Finger has said:
“Originally I was going to call Gotham City ‘Civic City’. Then I tried ‘Capital City’, then ‘Coast City’. Then I flipped through the New York City phone book and spotted the name ‘Gotham Jewelers’ and said, ‘That’s it,’ Gotham City. We didn’t call it New York because we wanted anybody in any city to identify with it.”
Gotham City could be anywhere.
Of course, “Gotham” had long been a well-known nickname for New York City – even prior to Batman’s introduction in 1939, which explains why “Gotham Jewelers” and many other businesses in New York City have the word “Gotham” in them. The nickname was first popularized in the nineteenth century. It was first used in print by Washington Irving in the November 11, 1807 edition of his Salmagundi, a periodical which satirized New York culture and politics. Irving took the name from the village of Gotham, Nottinghamshire, England, a place that, according to folklore, was inhabited by fools. The village’s name derived from Old English “gat” –meaning “goat”– and ham –“home”. So the name “Gotham” literally means the “homestead where goats are kept.” And it was originally pronounced “goat-em”. However, “Gotham” has taken on entire new meaning now and is more closely associated with the Gothic architecture that gives the city its dark, moody, and often dangers ambiance – more goth than goat.
In Detective Comics #880, the Joker mentions to Batman that Gotham means “heaven for goats”.
[some of the above information via wikipedia]