Why Gotham City?

The nickname Gotham for New York City came into popular use after 1807 when Washington Irving used it as a satirical name for the city in several essays published in his magazine Salmagundi. Irving borrowed the name from the real town of Gotham near Nottingham, England, which todays has about a thousand residents. Gotham is Anglo-Saxon for “goat town”. In the Middle Ages, according to folklore, the town’s people got the reputation of being “wise fools” by acting crazy and avoiding King John’s plan to tax them. By the seventeenth century the village and its people were the butts of many jokes about a village of idiots. Eventually the “fools of Gotham” were ironically referred to as the “wise man of Gotham”. Irving seems to have taken the name in the sardonic sense of New York as a city of self-important but foolish people. These pejorative connotations were gradually lost and today Gotham is a neutral nickname and sometimes a pseudonym for New York in popular culture. Batman protects Gotham City.
The City in Slang - Irving Lewis Allen