Lilith was a Carrionite who, like the rest of her race, was banished to the Deep Darkness by the Eternals.
Through the words of William Shakespeare after the death of his son, she as well as Mother Doomfinger and Mother Bloodtide, two other Carrionites, were able to escape into this universe on Earth in 1598.
From their arrival on into 1599, she helped influence in the construction of the Globe Theatre, persuading the architect, Peter Streete, to build the theatre so that it would have 14 sides.
In 1599, the three Carrionites opened a portal to the Deep Darkness, allowing all other Carrionites to enter this universe, but they were stopped by Shakespeare after her created a phrase that closed the portal and trapped Bloodtide, Doomfinger, and Lilith in their crystal ball, which the Doctor took. (DW: The Shakespeare Code)