I am curious because the idea of hiding the location whole city doesn't seem viable, but maybe I am underestimating the size of the world and/or overestimating the spread of information and maps.
It is a bit of a different question, but if it is not based on historical ideas, what was the first work of fiction to feature such?
Obviously proving a negative is rather difficult, but I can say that I have never heard of one and there is good reason to think a Gondolin style "hidden city" has never existed, which is close enough.
The main reason that this is unlikely is that a city is, fundamentally, a connected entity. It is connected to its own hinterland (essentially the area of most immediate supply), it is connected to territorial administration, and it is connected to other cities. A useful text for this is an early book of urban theory, Max Weber's The City in which he posited that there were three fundamental "types" of city--a consumer city (a city that exists to gather and centralize resources from the hinterlands, like an administrative center), a caravan city (a city that exists because it it occupies an important nexus of trade routes) and a producer center (a city that exists because it gathers and centralizes productive capability, think a factory town). Of course this is not literally real, all cities contain some element of all, no city perfectly conforms to any one, they are "ideal types". But as "ideal types" they are useful for thinking through these issues, and in this case useful for illustrating the fundamental importance of connectedness, of whatever type, in the nature of development of cities. Cities do not develop for no reason, there needs to be some sort of reason it draws populations in--be it economic, cultural, social, administrative, etc. These all, in turn, depend on the connections between the city and the area beyond the city. These connections are hard to form or maintain if the city is hidden!
(There are also practical matters: From a pure subsistence standpoint a city is almost definitionally unable to feed and support itself, it needs these connections to its hinterlands and farter afield.)
That said, the idea of the hidden city or place is one that pops up in folklore and literature, I wrote a bit about this in another answer you might find interesting, but I can expand if you have any specific questions.
[Ed: clarified and tightened some aspects of the answer up]