Heidelberg Catechism Lesson 31

Q. 83. What are the keys of the kingdom of heaven[1]?
The preaching of the holy gospel,[2] and Christian discipline, or excommunication out of the Christian church; [3] by these two, the kingdom of heaven is opened to believers, and shut against unbelievers.
[1] Matthew 16:19;   [2] John 20:23;  [3] Matthew 18:15–18.
Q. 84. How is the kingdom of heaven opened and shut by the preaching of the holy gospel?
Thus: when according to the command of Christ,[1] it is declared and publicly testified to all and every believer, that, whenever they receive the promise of the gospel by a true faith, all their sins are really forgiven them of God, for the sake of Christ’s merits;[2] and on the contrary, when it is declared and testified to all unbelievers, and such as do not sincerely repent, that they stand exposed to the wrath of God, and eternal condemnation, so long as they are unconverted:[3] according to which testimony of the gospel, God will judge them, both in this, and in the life to come.
[1] Matthew 28:19;   [2] John 3:18, 36; Mark 16:16;  [3] 2 Thessalonians 1:7–9; John 20:21–23; Matthew 16:19; Romans 2:2, 13–17.
Q. 85. How is the kingdom of heaven shut and opened by Christian discipline?
Thus: when according to the command of Christ,[1] those, who under the name of Christians, maintain doctrines, or practices inconsistent therewith,[2] and will not, after having been often brotherly admonished, renounce their errors and wicked course of life, are complained of to the church;[3] or to those, who are thereunto appointed by the church;[4] and if they despise their admonition, are by them forbidden the use of the sacraments;[5] whereby they are excluded from the Christian church, and by God Himself from the kingdom of Christ; and when they promise and show real amendment, are again received as members of Christ and His Church.[6]
[1] Matthew 18:15;   [2] 1 Corinthians 5:11–12;  [3] Matthew 18:15–18;   [4] Romans 12:7–9; 1 Corinthians 12:28; 1 Timothy 5:17; 2 Thessalonians 3:14;  [5] Matthew 18:17; 1 Corinthians 5:3–5;  [6] 2 Corinthians 2:6–8, 10–11; Luke 15:18.
Romanism until recently teaches that there is no salvation outside the Romish church (now the Pope has declared that all religions lead to the same God!). To buttress their doctrine, Romanism teaches that the keys of the kingdom were committed to Peter, and then by apostolic succession to the Popes and priests so that they had the power in their persons to determine who should be admitted into heaven and who should be excluded. They base their assertion on Matthew 16:19, where the Lord said unto Peter: “And I will give unto thee the keys of the kingdom of heaven: and whatsoever thou shalt bind on earth shall be bound in heaven: and whatsoever thou shalt loose on earth shall be loosed in heaven.” The Romish doctrine, however, cannot be sustained when Scripture is compared with Scripture, because what the Lord committed to Peter, He also committed to all the other disciples in John 20:21–23 where the Lord sent out His disciples to preach the Gospel with the words: “Whose soever sins ye remit, they are remitted unto them; and whose soever sins ye retain, they are retained” (Jn 20:23). The keys of the kingdom, or the office of binding or loosing, is that of preaching. Calvin explains:

What is the sum total of the gospel except that we all, being slaves of sin and death, are released and freed through the redemption which is in Christ Jesus (cf. Rom 3:24)? And that they who do not receive or acknowledge Christ as their liberator and redeemer are condemned and sentenced to eternal chains (cf. Jude 6)? (ICR 4.11.1).

In the same way, the office of loosing and binding is also elaborated by the Lord in Matthew 18:15–18, in the context of church discipline or the power of rulers of the church to excommunicate someone from the fellowship. Here the Lord tells the disciples: “Verily I say unto you, Whatsoever ye shall bind on earth shall be bound in heaven: and whatsoever ye shall loose on earth shall be loosed in heaven” (Mt 18:18). Does this mean that ministers have the power to admit or refuse admittance to heaven to anyone? Certainly not! For this will be reading into the text what is not there. All that the Lord says with regard to excommunication is: “Let him be unto thee as an heathen man and a publican” (Mt 18:17); in other words: “declare or regard him to be an unbeliever.” Calvin is again incisive:

The church binds him whom it excommunicates—not that it casts him into everlasting ruin and despair, but because it condemns his life and morals, and already warns him of his condemnation unless he should repents. It looses him whom it receives into communion, for it makes him a sharer of the unity which it has in Christ Jesus. Therefore that no one may stubbornly despise the judgement of the church, or think it immaterial that he has been condemned by the vote of believers, the Lord testifies that such judgement by believers is nothing but the proclamation of his own sentence, and that whatever they have done on earth is ratified in heaven (ICR 4.11.2).