“Mary benefited first of all and uniquely from Christ’s victory over sin: she was preserved from all stain of original sin and by a special grace of God committed no sin of any kind during her whole earthly life.” Catechism of the Catholic Church 411
According to Catholic teaching, Mary was able to live a sinless life because she was conceived without original sin, the sin that all humans are born with as a result of the fall of Adam and Eve. This special grace, known as the Immaculate Conception, was granted to Mary by God in anticipation of the merits of Jesus’ death and resurrection.
As a result of this grace, Mary was preserved from the stain of original sin and was able to live a life that was fully obedient to God’s will. She was also able to exercise her free will in a way that was fully in line with God’s plan, and she chose to say “yes” to God’s will when the angel Gabriel appeared to her and announced that she would bear the Son of God.
In addition to the grace of the Immaculate Conception, Mary also received other graces and blessings throughout her life, including the grace of perseverance, which enabled her to remain faithful to God until the end of her life.
Overall, Mary was able to live a sinless life because she was conceived without original sin and because she received the graces and blessings of God throughout her life, which enabled her to live in complete obedience to God’s will.
“In fact, in order for Mary to be able to give free assent of her faith to the announcement of her vocation, it was necessary that she be wholly borne by God’s grace.” Catechism of the Catholic Church 490