The name "Simchat Torah" does not appear in the Torah or the Talmud. The Talmud says that the final section of the Torah is read on Shemini Atzeret. But it does not use the name Simchat Torah, and it does not describe a special celebration. The first reference to any kind of celebration comes from the period of the "Geonim" (7th-11th centuries CE). That source mentioned the custom of dancing with the Torah, which is still a custom today.