As recounted in The Silmarillion, the Vala Ulmo, the Lord of Waters, revealed the location of the Vale of Tumladen to the Ñoldorin Lord Turgon in a dream. Under this divine guidance, Turgon travelled from his kingdom in Nevrast and found the vale. Within the Echoriath, the Encircling Mountains, just west of Dorthonion and east of the River Sirion, lay a round level plain with sheer walls on all sides and a ravine and tunnel leading out to the southwest known as the Hidden Way. In the middle of the vale there was a steep hill which was called Amon Gwareth, the "Hill of Watching". There Turgon decided to found a great city that would be protected by the mountains and hidden from the Dark Lord Morgoth.
Turgon and his people built Gondolin in secret. After it was completed, he took with him to dwell in the hidden city his entire people in Nevrast — almost a third of the Ñoldor — as well as nearly three quarters of the northern Sindar. He originally named the city Ondolindë, which is Quenya for "The Rock of the Music of Water" after the springs of Amon Gwareth. The name was later changed to its Sindarin form.
Hidden Way was
protected by seven gates, all constantly guarded; the first of wood, then stone,
bronze, iron, silver, gold, and steel. The city stood for nearly 400 years
until it was betrayed to Morgoth by Maeglin, Turgon's nephew, and sacked by the
Dark Lord's armies.