The Catechism of the Catholic Church beautifully states the doctrine of the Immaculate Conception of Mary, that is, that Mary was herself conceived without original sin:
491 Through the centuries the Church has become ever more aware that Mary, "full of grace" through God, was redeemed from the moment of her conception. That is what the dogma of the Immaculate Conception confesses, as Pope Pius IX proclaimed in 1854:It is important to focus on the fact that Mary was redeemed and that she was "redeemed in a more exalted fashion, by reason of the merits of her Son."
The most Blessed Virgin Mary was, from the first moment of her conception, by a singular grace and privilege of almighty God and by virtue of the merits of Jesus Christ, Savior of the human race, preserved immune from all stain of original sin.
492 The "splendor of an entirely unique holiness" by which Mary is "enriched from the first instant of her conception" comes wholly from Christ: she is "redeemed, in a more exalted fashion, by reason of the merits of her Son". The Father blessed Mary more than any other created person "in Christ with every spiritual blessing in the heavenly places" and chose her "in Christ before the foundation of the world, to be holy and blameless before him in love".
Rather than being redeemed later in life she was redeemed at the moment in which she was conceived. There is one primary reason for why Christ would save His mother in this way: Christ perfectly fulfilled the Law and thereby fulfilled the commandment "Thou shalt honor thy father and thy mother." We know that Christ perfectly honored His Father. He also perfectly honored His Mother. The most honorable thing He could do for His mother was to redeem her "in a more exalted fashion" as the Holy Father taught.
Is the Immaculate Conception Biblical? Yes, but only if you accept typology as a valid interpretation of Scriptural texts (i.e. a method used by the Apostles and Fathers to interpret Old Testament people, things, and events as types foreshadowing New Covenant realities). Below are three common arguments used by the early Church Fathers, the Popes, and the Catechism of the Catholic Church to justify Mary's title as the Panagia or "All-Holy." The first is straight-forward, the latter two rely on typology.
Mary is Full of Grace
Luke 1:28: "And he came to her and said, 'Hail, full of grace, the Lord is with you!'"The term traditionally translated "full of grace" or "highly favored" is kecharitomene. This past perfect form denotes something that happened in the past and continues into the present. She was perfectly graced in the past and continues in that state. Luke 1:28 has served as the locus classicus for the doctrine of the Immaculate Conception of Our Lady.
Mary as New Eve Having Enmity with Satan
Gen 3:15 "In this verse God addresses Satan. The Seed here is Christ. The Woman is His Mother, that is, Mary. Thus Satan has perfect enmity with Christ and with His Mother. The Catholic Church has interpreted this as indicating the sinlessness of Christ and Mary. If either actually committed sin, then they would not be at enmity with Satan but actually a cooperator with Satan at times. ."
Mary as Ark of the Covenant
In the Old Covenant the Ark of the Covenant contained the Word of God on stone. In the New Covenant, the Word made Flesh was also contained - and that in the womb of the Blessed Virgin. The Catholic Church has therefore understood Mary as the mystical Ark of the New Covenant. This connection is made in the book of Revelation.
Rev 11:19-12:2 Then God's temple in heaven was opened, and the ark of his covenant was seen within his temple; and there were flashes of lightning, voices, peals of thunder, an earthquake, and heavy hail. And a great portent appeared in heaven, a woman clothed with the sun, with the moon under her feet, and on her head a crown of twelve stars; she was with child.The Ark of the Covenant appears in Heaven and then in the next breath (and next verse) St John describes a pregnant woman appearing in Heaven. This Woman "contains" the Messiah.
The thinking goes that if Mary is the fulfillment of the Ark of the Covenant, then she must be "all holy". Remember that in the Old Covenant a man was killed for touching the ark. It was holy. If the box that held stone tablets was so restricted - so also would be the woman who actually carried God Himself. And so she is all pure and all holy, without the stain of sin.