As the Apostle says (Romans 6:3), "all we, who are baptized in Christ Jesus, are baptized in His death." And further on he concludes (Romans 6:11): "So do you also reckon that you are dead to sin, but alive unto God in Christ Jesus our Lord." Hence it is clear that by Baptism man dies unto the oldness of sin, and begins to live unto the newness of grace. But every sin belongs to the primitive oldness. Consequently every sin is taken away by Baptism.
… As the Apostle says (Romans 5:15-16), the sin of Adam was not so far-reaching as the gift of Christ, which is bestowed in Baptism: "for judgment was by one unto condemnation; but grace is of many offenses, unto justification." Wherefore Augustine says in his book on Infant Baptism (De Pecc. Merit. et Remiss. i), that "in carnal generation, original sin alone is contracted; but when we are born again of the Spirit, not only original sin but also wilful sin is forgiven."
… No sin can be forgiven save by the power of Christ's Passion: hence the Apostle says (Hebrews 9:22) that "without shedding of blood there is no remission." Consequently no movement of the human will suffices for the remission of sin, unless there be faith in Christ's Passion, and the purpose of participating in it, either by receiving Baptism, or by submitting to the keys of the Church. Therefore when an adult approaches Baptism, he does indeed receive the forgiveness of all his sins through his purpose of being baptized, but more perfectly through the actual reception of Baptism. [ST III, Q69, A1; emphasis added]
If no sin can be forgiven except "by the power of Christ's Passion," then it is impossible for a man to win justification for himself by anything that he does. Consequently they are badly misinformed who falsely suppose that the Catholic Church teaches a "works-based" salvation.