From The Metropolitan Opera website:
History, myth, and invention come together in Tannhäuser to create a unique and powerful drama. The title character was a real 13th-century Minnesinger who inspired a legend that Wagner used as the basis for the opera. He notably added the character of Elisabeth, based on the historical Saint Elisabeth of Hungary, wife of the Landgrave of Thuringia. The opera’s score went through several revisions after the original performances, most importantly when Wagner added the Venusberg ballet for the 1861 French premiere.