Objection 1: It seems that not everyone is obliged to receive baptism. For Christ did not narrow the way of man to salvation. But before the coming of Christ, people could be saved without baptism: therefore, also after the coming of Christ.
Objection 2: Furthermore, it seems that baptism was instituted mainly as a remedy against original sin. Now, since a person who is baptized is without original sin, it seems that he cannot transmit it to his children. Therefore, it seems that the children of those who have been baptized themselves do not need to be baptized.
Objection 3: Furthermore, baptism is administered so that a person may be cleansed from sin by grace. But those who are sanctified in the womb obtain this without baptism. Therefore, they are not obliged to receive baptism.
On the contrary, it is written (John 3:5): “Unless one is born of water and the Spirit, he cannot enter the kingdom of God.” Also, it is said in De Eccl. Dogm. xli: “We believe that the way of salvation is open only to the baptized.”
I answer that people are obliged to that without which they cannot obtain salvation. Now it is evident that no one can obtain salvation except through Christ; wherefore the Apostle says (Rom 5:18): “As by the offense of one, judgment came upon all men to condemnation; so also by the righteousness of one, the free gift came upon all men unto justification of life.” But for this purpose baptism is given to man, that, being reborn through it, he may be incorporated into Christ by becoming His member: wherefore it is written (Gal 3:27): “For as many of you as have been baptized into Christ have put on Christ.” Consequently, it is evident that all are obliged to be baptized, and that without baptism there is no salvation for men.
Reply to Objection 1: At no time, not even before the coming of Christ, could people be saved unless they became members of Christ: for as it is written (Acts 4:12), “there is no other name under heaven given among men, whereby we must be saved.” But before Christ’s coming, people were incorporated into Christ by faith in His future coming: of which faith circumcision was the “seal,” as the Apostle calls it (Rom 4:11); whereas before the institution of circumcision, people were incorporated into Christ “by faith alone,” as Gregory says (Moral. iv), together with the offering of sacrifices, by which the patriarchs of old professed their faith. But since the coming of Christ, people are incorporated into Christ by faith; according to Eph 3:17: “That Christ may dwell in your hearts by faith.” But faith in something already present is manifested by a different sign than that by which it was manifested when the thing was still in the future: just as we use different tenses of the verb to denote present, past, and future. Consequently, although the sacrament of baptism itself was not always necessary for salvation, the faith of which baptism is the sacrament was always necessary.
Reply to Objection 2: As we have stated in the First Part of the Second Part, Question [81], Article [3], ad 2, those who are baptized are renewed in spirit by baptism, while their body remains subject to the aging of sin, according to Rom 8:10: “The body indeed is dead because of sin, but the spirit is life because of righteousness.” Wherefore Augustine (Contra Julian. vi) proves that “not everything in man is baptized.” Now it is evident that man, in carnal generation, begets not as regards his soul, but as regards his body. Consequently, the children of those who are baptized are born with original sin; therefore, they need baptism.
Reply to Objection 3: Those who are sanctified in the womb do indeed receive the grace that cleanses them from original sin, but they do not thereby receive the character (character) by which they are conformed to Christ. Consequently, if anyone were now sanctified in the womb, he would need to be baptized, so that by receiving the character he might be conformed to the other members of Christ.
Source: Summa Theologiae, Third Part, Question 68, Article 1