In ST I-II, Q111 Aquinas discusses the division of grace, and in article 2 the distinction of operating and cooperating grace. But before he distinguishes them, he calls to our minds a prior distinction:
As stated above (Question 110, Article 2) grace may be taken in two ways; first, as a Divine help, whereby God moves us to will and to act; secondly, as a habitual gift divinely bestowed on us.The present discussion will benefit if we briefly review what the Angelic Doctor said in Q109 A1 rather than Q110 A2 (linked above so that you can follow along as you choose), because in the latter article he actually refers to the argument he makes in Q109 A1.
Now in corporeal things we see that for movement there is required not merely the form which is the principle of the movement or action, but there is also required the motion of the first mover. Now the first mover in the order of corporeal things is the heavenly body. Hence no matter how perfectly fire has heat, it would not bring about alteration, except by the motion of the heavenly body. But it is clear that as all corporeal movements are reduced to the motion of the heavenly body as to the first corporeal mover, so all movements, both corporeal and spiritual, are reduced to the simple First Mover, Who is God. And hence no matter how perfect a corporeal or spiritual nature is supposed to be, it cannot proceed to its act unless it be moved by God; but this motion is according to the plan of His providence, and not by necessity of nature, as the motion of the heavenly body. Now not only is every motion from God as from the First Mover, but all formal perfection is from Him as from the First Act. And thus the act of the intellect or of any created being whatsoever depends upon God in two ways: first, inasmuch as it is from Him that it has the form whereby it acts; secondly, inasmuch as it is moved by Him to act.This seems to be the first of the two ways in which St. Thomas says (in Q110 A2) we may understand grace - namely, "as a Divine help, whereby God moves us to will and to act."
[M]an is aided by God's gratuitous will in two ways: first, inasmuch as man's soul is moved by God to know or will or do something, and in this way the gratuitous effect in man is not a quality, but a movement of the soul; for "motion is the act of the mover in the moved." [Q110 A2]The second way in which grace may be understood is as a "habitual gift," whereby God graciously assists us in the fulfillment of our end (the Beatific Vision) - something to which we could not attain by our natural powers.
Secondly, man is helped by God's gratuitous will, inasmuch as a habitual gift is infused by God into the soul; and for this reason, that it is not fitting that God should provide less for those He loves, that they may acquire supernatural good, than for creatures, whom He loves that they may acquire natural good. Now He so provides for natural creatures, that not merely does He move them to their natural acts, but He bestows upon them certain forms and powers, which are the principles of acts, in order that they may of themselves be inclined to these movements, and thus the movements whereby they are moved by God become natural and easy to creatures, according to Wisdom 8:1: "she . . . ordereth all things sweetly." Much more therefore does He infuse into such as He moves towards the acquisition of supernatural good, certain forms or supernatural qualities, whereby they may be moved by Him sweetly and promptly to acquire eternal good. [ibid.]Now all this has been the background for I-II, Q111 A2, where (as noted above) St. Thomas says that grace may be understood in either of the two ways we have just reviewed (i.e., as a divine help, or as a habitual gift); and so (hopefully!) we now have said enough to be able to continue to what he says about the distinction of operating and cooperating grace.
Now in both these ways [viz., as a divine help, or as a habitual gift - RdP] grace is fittingly divided into operating and cooperating. For the operation of an effect is not attributed to the thing moved but to the mover. Hence in that effect in which our mind is moved and does not move, but in which God is the sole mover, the operation is attributed to God, and it is with reference to this that we speak of "operating grace." But in that effect in which our mind both moves and is moved, the operation is not only attributed to God, but also to the soul; and it is with reference to this that we speak of "cooperating grace."Aquinas says it is "operating grace" when God moves us to some action apart from ourselves: that is what he means when he says, "Hence in that effect in which our mind is moved and does not move, but in which God is the sole mover, the operation is attributed to God." In other words, there is no motion on our part in this case; we have not willed or done or thought anything. God has done it all. That is operating grace.
On the other hand, "cooperating grace" is of the sort when we do will, or act, or think: "But in that effect in which our mind both moves and is moved, the operation is not only attributed to God, but also to the soul; and it is with reference to this that we speak of 'cooperating grace.'"
Now there is a double act in us. First, there is the interior act of the will, and with regard to this act the will is a thing moved, and God is the mover; and especially when the will, which hitherto willed evil, begins to will good. And hence, inasmuch as God moves the human mind to this act, we speak of operating grace. But there is another, exterior act; and since it is commanded by the will, as was shown above (Question 17, Article 9) the operation of this act is attributed to the will. And because God assists us in this act, both by strengthening our will interiorly so as to attain to the act, and by granting outwardly the capability of operating, it is with respect to this that we speak of cooperating grace. Hence after the aforesaid words Augustine subjoins: "He operates that we may will; and when we will, He cooperates that we may perfect." And thus if grace is taken for God's gratuitous motion whereby He moves us to meritorious good, it is fittingly divided into operating and cooperating grace. [emphasis added]So much for the sense of grace as a divine help; now we must turn to the sense of grace as a habitual gift.
But if grace is taken for the habitual gift, then again there is a double effect of grace, even as of every other form; the first of which is "being," and the second, "operation"; thus the work of heat is to make its subject hot, and to give heat outwardly. And thus habitual grace, inasmuch as it heals and justifies the soul, or makes it pleasing to God, is called operating grace; but inasmuch as it is the principle of meritorious works, which spring from the free-will, it is called cooperating grace. [emphasis added]At last we come to the payoff for our present subject - namely, how all this is related to justification. St. Thomas tells us that it is operating grace that justifies. "[H]abitual grace, inasmuch as it heals and justifies the soul, or makes it pleasing to God, is called operating grace." Now as we have just seen, operating grace is that by which we distinguish the grace of God insofar as it acts upon us without any motion, or action, or willing on our part. But it is God's operating grace that justifies us. Therefore we have no part in our own justification; it is entirely a work of God done in us. Consequently we see once again that those who suppose that the Catholic Church teaches a works-based gospel are badly misinformed. There is no means by which we may justify ourselves before God; consequently we cannot save ourselves from our sins. We are entirely indebted to his grace.