In Matthew 16:19, we read that Jesus promised the keys to the Kingdom of Heaven to Saint Peter as the head-to-be of the Church. These keys represent the spiritual authority and jurisdiction of the physical Church that is echoed in the Kingdom of Heaven. "I will give you the keys to the kingdom of heaven. Whatever you bind on earth shall be bound in heaven; and whatever you loose on earth shall be loosed in heaven." [Mt. 16:19]
"The keys to the kingdom of heaven: the image of the keys is probably drawn from Isaiah 22:15-25 where Eliakim, who succeeds Shebnah as master of the palace, is given "the key of the house of David," which he authoritatively "opens" and "shuts" (Isaiah 22:22). Whatever you bind... loosed in heaven: there are many instances in rabbinic literature of the binding-loosing imagery. Of the several meanings given there to the metaphor, two are of special importance here: the giving of authoritative teaching, and the lifting or imposing of the ban of excommunication. It is disputed whether the image of the keys and that of binding and loosing are different metaphors meaning the same thing. In any case, the promise of the keys is given to Peter alone. In Matthew 18:18 all the disciples are given the power of binding and loosing, but the context of that verse suggests that there the power of excommunication alone is intended. That the keys are those to the kingdom of heaven and that Peter's exercise of authority in the church on earth will be confirmed in heaven show an intimate connection between, but not an identification of, the church and the kingdom of heaven." [United States Conference of Catholic Bishops.]
In John 21:15-17, we read that Jesus commissed Peter with full responsibility to feed his lambs and sheeps. "When they had finished breakfast, Jesus said to Simon Peter, 'Simon, son of John, do you love me more than these?' He said to him, 'Yes, Lord, you know that I love you.' He said to him, 'Feed my lambs.' He then said to him a second time, 'Simon, son of John, do you love me?' He said to him, 'Yes, Lord, you know that I love you.' He said to him, 'Tend my sheep.' He said to him the third time, 'Simon, son of John, do you love me?' Peter was distressed that he had said to him a third time, 'Do you love me?' and he said to him, 'Lord, you know everything; you know that I love you.' (Jesus) said to him, 'Feed my sheep.'"[Jn. 21:15-17]
The First Vatican Council cited these verses in defining that Jesus after his resurrection gave Peter the jurisdiction of supreme shepherd and ruler over the whole flock.
It should be noted that the powers of the Keys include the granting of indulgences.