According to Catholicism, how was Mary born without original sin? I am slowly converting to Catholicism and am confused on the doctrine of Immaculate Conception. I do understand that it is Mary's conception that she was free from original sin. According to St. Augustine, original sin was passed down via sexual intercourse. Augustine also said that because Jesus did not have a human biological father and was not conceived with sperm.  From what I understand of the story of St. Joachim and Anne, they had intercourse at the gates of Jerusalem. I may be wrong on these things as I am still learning. But taking these things into account, how can Mary be born without original sin if her parents had intercourse.
According to Catholicism, how was Mary born without original sin?

And the angel answering, said to her: The Holy Ghost shall come upon thee, and the power of the most High shall overshadow thee. And therefore also the Holy which shall be born of thee shall be called the Son of God. - Luke 1:35

The idea that the Virgin Mary was Immaculately conceived and born without any stain of original sin was due to the fact that it was by a unique privilege accorded by Almighty God.

The Immaculate Conception is a dogma of the Catholic Church which states that the Virgin Mary was free of original sin from the moment of her conception. It proved highly controversial in the Middle Ages, but was revived in the 19th century and was adopted as Church dogma when Pope Pius IX promulgated Ineffabilis Deus in 1854; this had the overwhelming support of the Church's hierarchy, although a few, including the Archbishop of Paris, warned that the Immaculate Conception is not stated in the New Testament and cannot be deduced from it. Protestants overwhelmingly rejected Ineffabilis Deus as an exercise in papal power and the doctrine itself as without foundation in Scripture, and Eastern Orthodoxy, although it reveres Mary in its liturgy, called on the Roman church to return to the faith of the early centuries. The iconography of the Virgin of the Immaculate Conception shows her standing, with arms outspread or hands clasped in prayer, and her feast day is 8 December.
Doctrine
The Immaculate Conception of Mary is one of the four Marian dogmas of the Catholic Church, meaning that it is held to be a truth divinely revealed, the denial of which is heresy. Defined by Pope Pius IX in Ineffabilis Deus, 1854, it states that Mary, through God's grace, was conceived free from the stain of original sin through her role as the Mother of God:

We declare, pronounce, and define that the doctrine which holds that the most Blessed Virgin Mary, in the first instance of her conception, by a singular grace and privilege granted by Almighty God, in view of the merits of Jesus Christ, the Saviour of the human race, was preserved free from all stain of original sin, is a doctrine revealed by God and therefore to be believed firmly and constantly by all the faithful.

(Since the 19th century a dogma has come to bear the meaning of a divinely revealed truth proclaimed by Church teaching and hence binding for all time on the faithful; while the Immaculate Conception asserts only Mary's freedom from original sin, the Council of Trent, held between 1545 and 1563, affirmed in addition her freedom from personal sin.)

The Immaculate Conception in Scripture is not explicitly supported for the doctrine of Mary's Immaculate Conception, but Catholic theologians say that biblical support is not totally absent either.

Sacred Scripture does not explicitly proclaim the doctrine of Mary's Immaculate Conception (i.e. freedom from original sin from the very start of her life). The Catholic Church reflected on this question for centuries, considering biblical texts which seemed related to the topic, at least implicitly. As a result of this prolonged reflection, Pius IX issued a dogmatic definition in 1854 affirming Mary's Immaculate Conception. This declaration (Ineffabilis Deus) indicates that the teaching has been infallibly revealed by God through the living Tradition of the Church. There are also a number of scriptural passages which may be cited in support of the teaching. The angelic greeting in Lk 1:28 refers to Mary as &quot;highly favored&quot; or &quot;full of grace.&quot; Both translations refer to the Greek term kecharitomene, the past perfect participle of charis which means a gift, favor or grace. In Biblical Greek, this verbal form suggests permanence and singularity. Such singular, permanent grace in Mary is essentially the same concept affirmed in the dogma of the Immaculate Conception.
Another source of biblical evidence involves the references to Mary as &quot;Woman&quot; (e.g. Jn 2 and Jn 19). The evangelist alludes to Eve, who is called &quot;Woman&quot; in Gen 2. There are other parallels between the Genesis account of Creation and its Fall and the Johannine account of the Redemption. For example, the tree of knowledge caused Adam's death in paradise. The tree of the cross caused the death of Jesus, the new Adam, in Jn 19. So there is a certain biblical parallel between Mary, the Woman of the New Creation, and Eve, the Woman formed in original justice at the first Creation (i.e. before the Fall). This parallel is stated explicitly by very early Church Fathers like Justin Martyr (d ca 160) and Irenaeus (d. ca 220). None of this is explicit proof of the doctrine. However, it is solid support from Scripture alone. - Immaculate Conception: Scripture

For more information about this subject matter the following may be of interest:

What is the biblical basis for the Immaculate Conception?