When the outcast makes intercession for those who despised Him, there can be no crime which He cannot forgive. Having suffered the guilt of all, He holds the keys of death and hell. He suffered both. It was perfectly unjust for Him to have suffered anything. Yet He suffered it all.
How can the gates of hell be opened? It requires someone upon whom death and hell could have no claim to go there. When justice itself requires Him to be released, then death and hell are conquered. This is what He would do. He would suffer the wrath of the guilty and vile, fully assume their punishment and abuse, and bear their penalty of death itself. When the fury relented, and the wrath ended, He could reclaim life. His captivity ended the captivity for all. Having then returned to life, because it was just for Him to do so, He acquired the keys of death and hell. Now He can open those gates for any and all because it was unjust for Him to have been put through either. He can now advocate for others by virtue of what He suffered and the injustice of that suffering. (D&C 45: 3-5.)