"The doctrine which holds that the Blessed Virgin Mary, from the first instant of her conception, was, by a most singular grace and privilege of Almighty God, in view of the merits of Jesus Christ, the Redeemer of the human race, preserved from all stain of Original Sin, is a doctrine revealed by God . . ." (1911 Encyclopedia Britannica section on the Immaculate Conception)
In the vast majority of cases, Catholic dogmas are declared out of ecumenical councils that are convened (e.g. the Council of Trent from 1545 - 1563). In the case of Mary's believed immaculate conception, however, the Pope only sought input from bishops. He ultimately, without convening a council, declared this belief in her immaculate creation as a dogma based strictly on his authority. Pope Pius XII, in 1950, used this authority to declare the belief in her bodily assumption into heaven at the end of her life.
The church claims that Mary's immaculate conception is hinted at by several "church fathers" such as Origen (c. 184 - c. 253 A.D.), Augustine (354 - 430), Tertullian (c. 155 - c. 240) and others. It is known that the festival of the Conception of the Blessed Virgin was celebrated in the Greek Church in the 7th century A.D.
The explicit question, however, concerning Mary being conceived immaculate (in a state of perfection) seems to have been first raised in the 11th century by St. Bernard of Menthon (from whom the St. Bernard dog is named).
The immaculate conception of Mary is part of a much broader package of Roman Catholic beliefs regarding Mary (the theological study of whom is known as Mariology). They include the teachings that she was a perpetual virgin (she never had sex and did not have children other than Jesus), she lived a sinless life (a belief Martin Luther supported), that she is the mother of God, plus others.
Officially, the Catholics make an eye-opening admission regarding this tenet of their faith. In the 1913 Catholic Encyclopedia, in an article dedicated to explaining the immaculate conception, under the subheading "proof from Scripture," it states, "No direct or categorical and stringent proof of the dogma can be brought forward from Scripture."
It should be noted that Thomas Aquinas (1225 - 1274), a Catholic priest who is considered one of the greatest medieval theologians, REJECTED Mary's immaculate conception before it ever became dogma (Summa Theologia, part iii., quaest. 27, art. 3).
Part of Aquinas' argument was that Mary had to be a sinner (see Romans 3:10, 23, Galatians 3:22, etc.) in order for her to need a Savior (Luke 1:47). Bonaventure, an influential Catholic theologian who was a contemporary of Aquinas (1221 - 1274), hesitated to accept the Immaculate Conception teaching for a similar reason.