Such was the promise granted Peter by the Savior.
“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”
(Matthew 16:19).
These keys were subsequently given to each member of the Twelve (see John 20:23) and the same keys were restored to Joseph Smith, to whom the Lord said:
“I have conferred upon you the keys and power of the priesthood, wherein I restore all things, and make known unto you all things in due time. And verily, verily, I say unto you, that whatsoever you seal on earth shall be sealed in heaven; and whatsoever you bind on earth, in my name and by my word, saith the Lord, it shall be eternally bound in the heavens; and whosoever sins you remit on earth shall be remitted eternally in the heavens; and whosesoever sins you retain on earth shall be retained in heaven. And again, verily I say, whomsoever you bless I will bless, and whomsoever you curse I will curse, saith the Lord; for I, the Lord, am thy God.”
(D&C 132:45-47.)