As stated above (Article 1 [discussed here – RdP]), the justification of the ungodly is a certain movement whereby the human mind is moved by God from the state of sin to the state of justice. Hence it is necessary for the human mind to regard both extremes by an act of free-will, as a body in local movement is related to both terms of the movement. Now it is clear that in local movement the moving body leaves the term "whence" and nears the term "whereto." Hence the human mind whilst it is being justified, must, by a movement of its free-will withdraw from sin and draw near to justice.
Now to withdraw from sin and to draw near to justice, in an act of free-will, means detestation and desire. For Augustine says on the words "the hireling fleeth," etc. (John 10:12): "Our emotions are the movements of our soul; joy is the soul's outpouring; fear is the soul's flight; your soul goes forward when you seek; your soul flees, when you are afraid." Hence in the justification of the ungodly there must be two acts of the free-will--one, whereby it tends to God's justice; the other whereby it hates sin. [ST I-II, Q113, A5; emphasis added]
St. Thomas does not use the word here, but it's sufficiently clear that repentance is what is in view here: we cannot cling to sin at the same time that we profess faith in Christ. This is consistent with the gospels' summaries of the preaching of the Lord Jesus: "Repent, for the kingdom of heaven is at hand" (Matthew 4:17); "The time is accomplished and the kingdom of God is at hand. Repent and believe the gospel" (Mark 1:15). It is consistent with St. Peter's sermon on Pentecost: "Do penance: and be baptized every one of you in the name of Jesus Christ, for the remission of your sins" (Acts 2:38). Hence we see that those who profess a gospel of "sola fide" are mistaken.
Some will say that to make repentance a requirement of salvation is tantamount to a works-based gospel, but it's worth pointing out that Aquinas already addresses this above, when he says that "the justification of the ungodly is a certain movement whereby the human mind is moved by God from the state of sin to the state of justice" (emphasis added). Hence we see that repentance is a gift of grace, and not something we can do in and of ourselves.