Try not to think of all those cartoons you have seen of St. Peter at heaven's gate, letting some in and excluding others. For one thing, Matthew does not restrict the term, heaven, to mean a place somewhere else, at a time only after death. Rather, the kingdom of heaven is a more pious way of saying kingdom of God; that is, a place here and now, where God is in charge.
Peter has the keys; that is, Peter understand and can convey what kingdom life is like, what kingdom residents are like.
Jesus built this church and entrusted Peter with it.
(with thanks once again to Boring & Craddock's The People's New Testament Commentary)