The image arises from Jesus' words as described in the Christian New Testament of the Bible. The relevant phrase is in the gospel of Matthew 16.19
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.
Because of this images of the apostle Peter commonly show him carrying keys and acting as a gatekeeper to heaven. Simon/Peter is also often pictured as a fisherman both because that was his trade and because in the gospel of Luke 5.10 Jesus is quoted as saying to him
Have no fear; from this time forward you will be a fisher of men.