In those days Mary arose and went with haste into the hill country, to a town in Judah, and she entered the house of Zechariah and greeted Elizabeth. And when Elizabeth heard the greeting of Mary, the baby leaped in her womb. And Elizabeth was filled with the Holy Spirit, and she exclaimed with a loud cry, “Blessed are you among women, and blessed is the fruit of your womb!”—Lk 1:39-42 (ESV)
Many Church Fathers teach that St. John the Baptist was justified (cleansed of original sin) as soon as he heard the voice of Mary when he was in the womb of his mother Elizabeth. (This is one reason why he leapt for joy!) St. John the Baptist was conceived in original sin, but born without original sin as he was so filled with the Holy Spirit at the greeting of the Immaculate Virgin Mary. After this, St. John the Baptist never committed a mortal or even venial sin.
The Church Fathers look to the prophet Jeremiah as the proof of this: Before I formed thee in the bowels of thy mother, I knew thee: and before thou camest forth out of the womb, I sanctified thee, and made thee a prophet unto the nations.—Jeremiah 1:5 (DRB)
In fact, many Church Fathers believe that both St. John the Baptist and Jeremiah were justified (washed of original sin) before their births. Some of the Church Fathers were a bit divided on this, but by the time the Jesuit Fr. Cornelius A Lapide SJ conglomerated their teachings around the year 1600, he came to the following conclusions:
Was John then truly cleansed from original sin in the womb and justified? S. Augustine (Ep. 57) and S. Jerome (in Jerem. i.) maintain that he was not; for they say that John and Jeremiah are both said to have been sanctified in the womb not really, but according to the predestination of God; for they were ordained to future sanctity so that the same is said here concerning John that the Apostle says of himself, Gal. i., “Who separated me from my mother’s womb.” The reason that S. Augustine gives is, that to be born again presupposes being born; but John when in the womb was not yet born; therefore he could not have been born again in reality, but only according to the predestination of God.
But the common opinion of the Fathers is contrary to this (S. Athanasius, Cyprian, Ambrose, Gregory, and others) which I approve of. First, because the angel here most clearly promises “he shall be filled with the Holy Ghost even from his mother’s womb.” Secondly, because at the salutation of the Blessed Virgin he believed in Christ when in the womb. For at that time it was when he was visited and saluted by the Blessed Virgin, in the sixth month from his conception that this wonderful sanctification took place. To the argument of S. Augustine I answer, that a man in order that he may be born again may be considered as born when he has been conceived in the womb; for then as he is born in original sin so also he can by grace be born again and even baptized, as is clear from the practice of the Church in certain cases.—Fr. Cornelius A Lapide SJ, circa AD 1600.