This passage exists within The Institutes of the Christian Religion’s third book entitled “The mode of obtaining the grace of Christ. The benefits it confers, and the effects resulting from it” (especially note the “benefits” and “effects” “resulting from” grace received). In this section Calvin seeks to refute the idea that the reformers “destroy good works, and give encouragement to sin” by their doctrine of justification by faith alone. On the contrary, Calvin desires to prove that “justification by faith establishes the necessity of good works” (emphasis mine).
Our last sentence may refute the impudent calumny of certain ungodly men, who charge us, first, with destroying good works and leading men away from the study of them, when we say, that men are not justified, and do not merit salvation by works; and, secondly, with making the means of justification too easy, when we say that it consists in the free remission of sins, and thus alluring men to sin to which they are already too much inclined. These calumnies, I say, are sufficiently refuted by that one sentence; however, I will briefly reply to both. The allegation is that justification by faith destroys good works. … They pretend to lament that when faith is so highly extolled, works are deprived of their proper place. But what if they are rather ennobled and established? We dream not of a faith which is devoid of good works, nor of a justification which can exist without them: the only difference is, that while we acknowledge that faith and works are necessarily connected, we, however, place justification in faith, not in works. How this is done is easily explained, if we turn to Christ only, to whom our faith is directed and from whom it derives all its power. Why, then, are we justified by faith? Because by faith we apprehend the righteousness of Christ, which alone reconciles us to God. This faith, however, you cannot apprehend without at the same time apprehending sanctification; for Christ “is made unto us wisdom, and righteousness, and sanctification, and redemption,” (1 Cor. 1:30). Christ, therefore, justifies no man without also sanctifying him. These blessings are conjoined by a perpetual and inseparable tie. Those whom he enlightens by his wisdom he redeems; whom he redeems he justifies; whom he justifies he sanctifies. But as the question relates only to justification and sanctification, to them let us confine ourselves. Though we distinguish between them, they are both inseparably comprehended in Christ. Would ye then obtain justification in Christ? You must previously possess Christ. But you cannot possess him without being made a partaker of his sanctification: for Christ cannot be divided. Since the Lord, therefore, does not grant us the enjoyment of these blessings without bestowing himself, he bestows both at once but never the one without the other. Thus it appears how true it is that we are justified not without, and yet not by works, since in the participation of Christ, by which we are justified, is contained not less sanctification than justification.
— Cited from John Calvin’s The Institutes of the Christian Religion (Bellingham, WA: Logos Bible Software, 1997), book III, chapter 16, section 1. Emphasis added.
One is justified when, a part from his own righteousness, he lays hold of Christ by faith and, having been united to Him by that faith, lays hold of Christ’s perfect righteousness. Our righteousness is a foreign righteousness, i.e., Christ’s righteousness. And therefore, it is found in union with Christ. We are regarded as righteous having been united to Christ by faith. He is our righteousness.
But, that same union with Christ that results in our justification necessarily results in our sanctification. If we have Christ, we have all of Him, we are united to Him entirely, and we shall receive all of the salvation found in Him. All of salvation*–from salvation planned (i.e., predestination, election), salvation accomplished (Christ’s saving work), and salvation applied (regeneration, repentance, faith, justification, sanctification, perseverance, glorification)–is connected and inseparable. We cannot receive one aspect apart from receiving all others. And that is Calvin’s point.
And therefore, although we reject the idea that works contribute whatsoever to our justification, i.e., that we are at all considered righteous before God based on our own merit, we also reject any notion of a salvation* devoid or lacking good works.
* This requires thinking of “salvation” as something broader than just forgiveness of sins at conversion. For example, see the following ways the New Testament refers to “salvation” (past–Acts 2:21; Eph 2:8; Tit 3:5; present – 1 Cor 1:18; 15:2; 2 Cor 2:15; future – Heb 9:28; 1 Pet 1:5).