The 2nd-century Gospel of James, although not chosen as an official Biblical text, introduced the notion that Mary's birth was special. It introduces Anne and Joachim, Mary's parents, who could not conceive a child. God hears their prayers, and Anne becomes pregnant without intercourse between her and her husband. James claims that, on her first birthday, Mary is blessed by priests who declare that God will bring redemption to Israel through her.
The Council of Ephesus in 431 (mentioned here) gave Mary the title Mother of God. It was difficult to accept that someone so close to Jesus was not herself special in some way, and difficult to accept that she would have engaged in sinful acts.
Mary's conception was being celebrated in the Eastern Church in the 7th century and spread to England in the 11th, promoted by the scholar Eadmer, who thought God's omnipotence meant it was possible Mary was conceived without sin. His Latin summary was Potuit, decuit, fecit, "it was possible, it was fitting, [therefore] it was done."
Bernard of Clairvaux and Thomas Aquinas objected to the reasoning, because if Mary could be born without original sin, then why did we need Jesus as Savior to free mankind from original sin? Duns Scotus argued against them, claiming that being "preserved free from original sin was a greater grace than to be set free from sin." His reasoning was that it was God's grace that "saved" her, not anything inherent in herself. This distinguishes her from the Savior who was free from sin inherently.
In 1439, the Council of Basel declared that the idea of the Immaculate Conception was an opinion consistent with faith and Scripture. The Council of Trent in the mid-1500s, while establishing a proper calendar for saints and feast days, declared that she was exempt from original sin, and shortly after the Feast of the Immaculate Conception on 8 December gained an elaborate celebration.
Despite sketchy scholarship, the idea of the Immaculate Conception of Mary was a very popular idea. In 1849, Pope Pius IX asked the bishops of the Church whether the Immaculate Conception should be enshrined in dogma. Ninety percent supported it, although some pointed out that there was no Scriptural support for the idea. It became official dogma on 8 December 1854, declared by Pope Pius IX.
Bernard of Clairvaux, despite his opposition to the concept of the Immaculate Conception, was especially devoted to Mary and wrote several works about her. He was also a saint, co-founder of the Templars, and a Doctor of the Church for his learning and efforts. I'll tell you more tomorrow.