To be saved, Trent teaches that two things are necessary. Justification, which is the translation to the state of grace. And, perseverance in the justice received or the state of grace until the end of life.
Post justification or baptism, good works are indispensably necessary because "the justice received is preserved and also increased before God through good works". Yet, no one can perform a meritorious work without the actual grace of God preceding and assisting, to wit, God "continually infuses strength into those justified, which strength always precedes, accompanies and follows their good works."
So, those who neglect good works will be more likely to fall away completely, whereas those who perform good works, as St. Peter says and Trent quotes "Labor the more, that by good works you may make sure your calling and election." St. Paul and others show the real possibility of falling away after being really justified, which Trent quotes as proof, "I therefore so run, not as at an uncertainty; I so fight, not as one beating the air, but I chastise my body and bring it into subjection; lest perhaps when I have preached to others, I myself should become a castaway."
The prime heresy of Protestantism was the notion of imputed justice or righteousness. Thus the justice of Christ is not infused into us, but is only imputed, and for this reason can neither be increased or lost. Thus, "once saved, always saved", good works are nothing more than fruits of justification and other heresies.
"If anyone says that ... that those works are merely the fruits and signs of justification obtained, but not the cause of its increase, let him be anathema"
If anyone says that a man once justified can sin no more, nor lose grace, and that therefore he that falls and sins was never truly justified ... let him be anathema."