Hephaestus attempted to rape Athena, but she eluded him. His semen fell to the earth and impregnated the soil, and Erichthonius was born from the Earth, Gaia. Athena then raised the baby as a foster mother.
Athena puts the infant Erichthonius into a small box (cista) which she entrusts to the care of three sisters, Herse, Pandrosus, and Aglaulus of Athens. The goddess does not tell them what the box contains, but warns them not to open it until she returns. One or two sisters opens the cista to reveal Erichthonius, in the form (or embrace) of a serpent. The serpent, or insanity induced by the sight, drives Herse and Aglaulus to throw themselves off the Acropolis. Jane Harrison (Prolegomena) finds this to be a simple cautionary tale directed at young girls carrying the cista in the Thesmophoria rituals, to discourage them from opening it outside the proper context.
Another version of the myth of the Athenian maidens is told in Metamorphoses by the Roman poet Ovid (43 BC – 17 AD); in this late variant Hermes falls in love with Herse. Herse, Aglaulus, and Pandrosus go to the temple to offer sacrifices to Athena. Hermes demands help from Aglaulus to seduce Herse. Aglaulus demands money in exchange. Hermes gives her the money the sisters have already offered to Athena. As punishment for Aglaulus's greed, Athena asks the goddess Envy to make Aglaulus jealous of Herse. When Hermes arrives to seduce Herse, Aglaulus stands in his way instead of helping him as she had agreed. He turns her to stone.
With this mythic origin, Erichthonius became the founder-king of Athens, and many beneficial changes to Athenian culture were ascribed to him. During this time, Athena frequently protected him.