The doctrine that the Torah was given by God to Moses at Sinai runs through rabbinic literature long before it was stated as a formal article of faith. The Mishnah's tractate Avot opens by tracing an unbroken chain of transmission from Moses at Sinai down through Joshua, the elders, the prophets and the men of the Great Assembly to the rabbis themselves, grounding the authority of the Oral Torah, the interpretive tradition later written down in the Mishnah and Talmud, in the same revelatory moment as the Five Books.
Moses Maimonides gave the doctrine its classical, creed-like form in the twelfth century. His Thirteen Principles of Faith, appended to his commentary on the Mishnah, name belief in the Torah's Sinaitic origin twice: the eighth principle holds that the Torah now in Jewish hands is, word for word, the Torah given to Moses, and the ninth adds that this Torah will never be changed or replaced by another. Maimonides treated denial of either as placing a person outside the community of belief, a severity later Orthodox authorities have generally maintained even where they have softened other parts of his list.
The claim carries two distinct parts that later disagreement would pull apart: that a Torah was given at Sinai, and that the Oral Torah, the rabbinic tradition of interpretation, was given there too and carries the same binding force as the written text. Reform, Conservative and Reconstructionist Judaism would each, in different ways and to different degrees, question or reject the second part while continuing to hold some form of the first, and Karaite Judaism would reject the second part outright while affirming the first as strongly as Orthodoxy does. The history of the doctrine after Maimonides is largely the history of that split.