No one is owed heaven, and no one earns their way to heaven.
Heaven is a purely and totally free gift from God that he lovingly offers to humankind. It is the individual human person who freely and knowingly either accepts the gift or rejects it. While no one deserves heaven, every human being, thanks to Christ’s death and resurrection, now has the possibility and the opportunity of going to heaven.
Theologically speaking, since the sin of Adam and Eve (original sin), human nature has been wounded and has fallen. It needs sanctifying grace from God, which is a supernatural divine assistance that justifies and redeems by the merits and sacrifice of Jesus Christ’s death on the cross.
Only baptism confers this special grace; without this grace, the soul cannot enter heaven. Jesus died for all men and women (sufficient grace, as Saint Augustine would call it), but it only affects those who freely accept and cooperate with it (efficacious grace). Jesus redeemed human nature by making salvation possible, but salvation occurs at the moment the person enters heaven. That is why Catholics do not refer to any of the living as “saved,” since only the saints in heaven are actually saved (that is, they are now in heaven and will be there forever). Catholics do say they are “redeemed” since all men and women were redeemed by the sacrifice of Christ on the cross.
Think of it this way. A drowning man is thrown a life preserver on a rope. That is redemption. He is now capable of being saved. Without it, he would be lost. Getting him safely out of the water and onto the ship is salvation. Only those in heaven have been saved and we on Earth, though redeemed, still wait for our salvation—which comes only through Christ at the time of our death.
If baptism is necessary and Christ is the only way to salvation, then does that mean only Christians go to heaven? No. Anyone who through no fault of his own has not consciously or willingly rejected Christ and His church is not culpable (guilty), and God does not punish us for things for which we are not responsible. Besides the baptism of water, there are also the baptism of blood and the baptism of desire. If it is not their fault that they do not know and believe that Jesus Christ is the only means of salvation, or that he founded the Catholic Church to accomplish that salvation of souls, then their ignorance of the truth will excuse them from being deprived of the joys of heaven. They will be judged according to the morality of the life they lived on earth. Whatever faith they had, they will be judged as to what they did or did not do with that faith.
The Catholic Church condemned and excommunicated those who said only formal (baptized and registered in a parish) members of the Catholic Church are saved. The proper understanding of the axiom extra ecclesia nulla salus (outside the church there is no salvation) is explained.
Since the Church believes in the universal salvific will of God—that He offers everyone sufficient grace to be saved even though it is only efficacious to those who accept and cooperate with it—there is also the teaching that many non-Catholics and non-Christians are saved implicitly. They are considered “anonymous” Catholic Christians. God-fearing Jews, Muslims, Hindus, Taoists, Buddhists, and those of all faiths who do not know that Christ and His Catholic Church are necessary for salvation, and as a result have not deliberately rejected Christ or His Church, are not penalized for what they do not know. So the Catholic Church does not teach that Protestants and Jews and Muslims and other non-Catholics go to hell simply because they are not Catholic.
The reason someone is not Catholic is crucial. Most people are not Catholic because that is not the religion they were born into or because no one taught them properly. Most non-Catholics who choose not to become Catholic base their decision on what they think, presume, or have been told Catholicism teaches and does. The real doctrines and disciplines have not been fully and adequately explained to them. Some base their decision on emotion or experience. Hence, bad examples of Catholic Christianity from clergy to laity alike, whether a neighbor, relative, classmate, or coworker, or a distorted caricature of what Catholicism is about (like accusations of Catholics worshiping Mary or attempting to buy souls out of purgatory), all color the perception.
What is perceived is what is rejected, but our salvation depends on believing what is real and true. If our perception is not clear, or if it has been tainted, discolored, or even blinded, then it is not our fault. We cannot be held liable for what is not within our control. Therefore, anyone and everyone has the possibility and potential for heaven as long as they sincerely seek to know and do the will of God.
Obviously, part of God’s will was to send His Son, Jesus Christ, and His will was to found a Church and institute seven sacraments which would be administered by that Church.