In Ancient Greek, the name of the city was Ἀθῆναι (Athênai, pronounced [a.tʰɛ̂ː.nai̯] in Classical Attic) a plural. In earlier Greek, such as Homeric Greek, the name had been current in the singular form though, as Ἀθήνη (Athḗnē). It was possibly rendered in the plural later on, like those of Θῆβαι (Thêbai) and Μυκῆναι (Μukênai). The root of the word is probably not of Greek or Indo-European origin, and is possibly a remnant of the Pre-Greek substrate of Attica. In antiquity, it was debated whether Athens took its name from its patron goddess Athena (Attic Ἀθηνᾶ, Athēnâ, Ionic Ἀθήνη, Athḗnē, and Doric Ἀθάνα, Athā́nā) or Athena took her name from the city. Modern scholars now generally agree that the goddess takes her name from the city, because the ending -ene is common in names of locations, but rare for personal names. During the medieval period, the name of the city was rendered once again in the singular as Ἀθήνα. However, after the establishment of the modern Greek state, and partly due to the conservatism of the written language, Ἀθῆναι [aˈθine] became again the official name of the city and remained so until the abandonment of Katharevousa in the 1970s, when Ἀθήνα, Athína, became the official name.
According to the ancient Athenian founding myth, Athena, the goddess of wisdom, competed against Poseidon, the god of the seas, for patronage of the yet-unnamed city; they agreed that whoever gave the Athenians the better gift would become their patron and appointed Cecrops, the king of Athens, as the judge. According to the account given by Pseudo-Apollodorus, Poseidon struck the ground with his trident and a salt water spring welled up. In an alternative version of the myth from Vergil's Georgics, Poseidon instead gave the Athenians the first horse. In both versions, Athena offered the Athenians the first domesticated olive tree. Cecrops accepted this gift and declared Athena the patron goddess of Athens.
Different etymologies, now commonly rejected, were proposed during the 19th century. Christian Lobeck proposed as the root of the name the word ἄθος (áthos) or ἄνθος (ánthos) meaning "flower", to denote Athens as the "flowering city". Ludwig von Döderlein proposed the stem of the verb θάω, stem θη- (tháō, thē-, "to suck") to denote Athens as having fertile soil.
In classical literature, the city was sometimes referred to as the City of the Violet Crown, first documented in Pindar's ἰοστέφανοι Ἀθᾶναι (iostéphanoi Athânai), or as τὸ κλεινὸν ἄστυ (tò kleinòn ásty, "the glorious city"). In medieval texts, variant names include Setines, Satine, and Astines, all derivations involving false splitting of prepositional phrases. Today the caption η πρωτεύουσα (ī protévousa), "the capital", has become somewhat common.