From very early in the history of Christianity and right through the middle ages, two of the biggest problems for loving Christians were:
1. What happens to unbaptized children? Do they go to Hell?
2. What happened to the pagans who lived before Christ - do they necessarily go to Hell?
Both of these are linked, and both were a problem because it was assumed that there was no possibility of salvation outwith the sacraments administered by the church, and no possibility of salvation without knowledge of Christ.
This inference has always been resisted by many Christians, since it would imply that God was more cruel, less merciful than ordinary human beings.
But the reason we know about all this, is that the problem was felt particularly acutely among Christian intellectuals who greatly valued - indeed venerated - the Classical learning of the ancient Greeks and pre-Christian Romans - especially the Emperor Trajan who was variously asserted to be in Heaven.
It seems evident that the Mormon Prophet Joseph Smith also felt these problems acutely, and (by his revelations and by logic) inferred that the problem was an artificial one produced by:
1. The false understanding of original sin.
2. The false assertion that there was no salvation outwith the church (specifics depending upon which particular denomination was doing the asserting).
3. A false understanding of the role of sacraments such as baptism and holy communion.
The different take of Mormonism can be seen from two striking passages in the Book of Mormon (taken from http://www.lds.org/scriptures/bofm?lang=eng ).
15 And now, my son, I would say somewhat unto you concerning the acoming of Christ. Behold, I say unto you, that it is he that surely shall come to take away the sins of the world; yea, he cometh to declare glad tidings of salvation unto his people.
16 And now, my son, this was the ministry unto which ye were called, to declare these glad tidings unto this people, to prepare their minds; or rather that salvation might come unto them, that they may prepare the minds of their achildren to hear the word at the time of his coming.
17 And now I will ease your mind somewhat on this subject. Behold, you marvel why these things should be known so long beforehand. Behold, I say unto you, is not a soul at this time as precious unto God as a soul will be at the time of his coming?
18 Is it not as necessary that the plan of redemption should be amade known unto this people as well as unto their children?
19 Is it not as easy at this time for the Lord to asend his angel to declare these glad tidings unto us as unto our children, or as after the time of his coming?
This passage is a key one in understanding the distinctive doctrines of Mormonism. The idea that it was as easy for people before the coming of Christ to attain salvation as for people after the coming of Christ.
That pre-Christians knew enough for salvation; and that therefore (from the perspective of salvation) the problem of the virtuous pagan disappears.
(This is assuming that there is no such thing as original sin as conceptualized by the medieval church - for which see below.)
This becomes more apparent in what seems to be the most vehemently argued of any section of the Book of Mormon - Chapter 8 of the Book of Moroni:
4 And now, my son, I speak unto you concerning that which grieveth me exceedingly; for it grieveth me that there should adisputations rise among you.
5 For, if I have learned the truth, there have been disputations among you concerning the baptism of your little children.
6 And now, my son, I desire that ye should labor diligently, that this gross error should be removed from among you; for, for this intent I have written this epistle.
7 For immediately after I had learned these things of you I inquired of the Lord concerning the matter. And the aword of the Lord came to me by the power of the Holy Ghost, saying:
8 aListen to the words of Christ, your Redeemer, your Lord and your God. Behold, I came into the world not to call the righteous but sinners to repentance; the bwhole need no physician, but they that are sick; wherefore, little cchildren are dwhole, for they are not capable of committing esin; wherefore the curse of fAdam is taken from them in me, that it hath no power over them; and the law of gcircumcision is done away in me.
9 And after this manner did the Holy Ghost manifest the word of God unto me; wherefore, my beloved son, I know that it is solemn amockery before God, that ye should baptize little children.
10 Behold I say unto you that this thing shall ye teach—repentance and baptism unto those who are aaccountable and capable of committing sin; yea, teach parents that they must repent and be baptized, and humble themselves as their little bchildren, and they shall all be saved with their little children.
11 And their little achildren need no repentance, neither baptism. Behold, baptism is unto repentance to the fulfilling the commandments unto the bremission of sins.
12 But little achildren are alive in Christ, even from the foundation of the world; if not so, God is a partial God, and also a changeable God, and a brespecter to persons; for how many little children have died without baptism!
13 Wherefore, if little children could not be saved without baptism, these must have gone to an endless hell.
14 Behold I say unto you, that he that supposeth that little children need baptism is in the gall of bitterness and in the bonds of iniquity; for he hath neither afaith, hope, nor charity; wherefore, should he be cut off while in the thought, he must go down to hell.
15 For awful is the wickedness to suppose that God saveth one child because of baptism, and the other must perish because he hath no baptism.
16 Wo be unto them that shall pervert the ways of the Lord after this manner, for they shall perish except they repent. Behold, I speak with boldness, having aauthority from God; and I fear not what man can do; for bperfect clove dcasteth out all fear.
17 And I am filled with acharity, which is everlasting love; wherefore, all children are alike unto me; wherefore, I love little children with a perfect love; and they are all alike and bpartakers of salvation.
18 For I know that God is not a partial God, neither a changeable being; but he is aunchangeable from ball eternity to all eternity.
19 Little achildren cannot repent; wherefore, it is awful wickedness to deny the pure mercies of God unto them, for they are all alive in him because of his bmercy.
20 And he that saith that little children need baptism denieth the mercies of Christ, and setteth at naught the aatonement of him and the power of his redemption.
21 Wo unto such, for they are in danger of death, ahell, and an bendless torment. I speak it boldly; God hath commanded me. Listen unto them and give heed, or they stand against you at the cjudgment-seat of Christ.
22 For behold that all little children are aalive in Christ, and also all they that are without the blaw. For the power of credemption cometh on all them that have dno law; wherefore, he that is not condemned, or he that is under no condemnation, cannot repent; and unto such baptism availeth nothing—
23 But it is mockery before God, denying the mercies of Christ, and the power of his Holy Spirit, and putting trust in adead works.
For Mormons, the powerful moral intuition that it would be a vile injustice for young children to be condemned to eternal Hell because they were not baptized is, in effect, taken as a reductio ad absurdum of traditional Christian theology - especially the most prevalent 'mainstream' understanding of original sin, which was/is that OS implies a default destiny of Hell for all humans.
So what happens to the theological status of the sacraments? As so often in Mormon theology, qualitative distinctions are made quantitative - and matters of salvation become matters of theosis/ sanctification or spiritual progression.
For Mormons, baptism is not a matter of salvation; rather it is a necessary step in spiritual progression, and a matter of the provision of objective, supernatural help and assistance in progression.
Likewise the sacrament of the Eucharist/ Holy Communion/ Lord's Supper is transformed into an objectively-valuable and supernaturally-administered help and assistance in the main business of life: which is resisting corruption and moving closer to God.