One of the many doctrines for which I find no allies, is the idea that a person must be baptised, either in person, or by proxy, to enter the Kingdom of Heaven. By “Kingdom of Heaven” I mean heaven with its three main degrees of glory. ( See John 3:5)
I approach this topic carefully, I am fully aware of church leaders who have had a different opinion on this topic, President Joseph Fielding Smith, being the main one. However, I am unaware of any official declaration from any First Presidency on this topic, so I feel free to see things differently. Add this topic to the list which includes; death before the fall, evolution, the earth’s age, etc..
My thesis is that the temple is the template of the Plan of Salvation. It is the Plan of Redemption laid out in stone. It is how the universe and eternity work. Prof. Hugh Nibley said:
“This scale model of the universe is the temple. Of course, the word for temple in Latin, templum, means the same thing as template: a plan marked out on the ground by the augur's staff…” 
All true temples mark out four divisions of space, three are sacred space, and one is reserved for the profane. Three are inside of the sacred space, and one is without. In common LDS parlance they are the Celestial, Terrestrial, and Telestial kingdoms. Each of these kingdoms has a direct correspondence to one of the three sacred spaces in the temple. This is the message of the temple. The Holy of Holies is the Celestial Room, The Holy Place is the Terrestrial Room, the Court is the Telestial Room. These are all descriptions of the resurrection. The baptismal font or "Laver," or "Molten Sea" are located in the Telestial section.
In Solomon’s Temple, the first section within the sacred space corresponds, by illistration or imagery, to the Telestial kingdom. This space was outdoors, suggesting to the mind that it is related to this world in which we live. How does it differs from the world outside of sacred space? It is redeemed, saved, or atoned for. Only those within the sacred space are heirs of salvation, and that is done through repentance and baptism (principles and ordinances). Within the sacred space of the Telestial portion of the temple baptisms are preformed. An initiate can’t advance to the Terrestrial sacred space until the ordinances of the Telestial kingdom are complete. The same is true for entering the Celestial portion of the temple.
The Prophet Joseph Smith is criticized for making up the word “Telestial.” It was his made-up word. It has to do with receiving the initial ordinances, or mysteries.
“ Teleiomai [relating to the telestial kingdom] means to be introduced into the mysteries… [a] teleiotes is a person who has been initiated into some degree or other of the mysteries…” 
"Telos" means initiation, it is the gate, the first degree.
Baptisms, whether for the living or the dead are always done in the Telestial Kingdom (this life, or the space in the temple that corresponds to the Telestial Kingdom).
All this being said, the church is charged with building the Celestial Kingdom. The work of preparing the worlds of the Terrestrial and Telestial kindoms will not be done until the millenium.
We will inherit the kingdom that is represented by the place in the temple, that teaches the principles we are willing to live. When we live those principles, we accept the ordinances of that level of sanctification, and inherit that kingdom or glory. We can’t go to that kingdom of glory and reject the principles or the ordinances of that kingdom. (see D&C 88:24)
 Hugh Nibley, Don E. Norton, Temple and Cosmos: Beyond This Ignorant Present, Deseret Book, The Meaning of the Temple.
 Temple and Cosmos, Hugh Nibley, Deseret Book, Pg# 28