Traditionally Catholics have taught that the Church is necessary for salvation. This belief is based on the teaching of both Scripture and tradition. We believe that Jesus is present in His body, the Church, and that He is the one Mediator and the unique way to salvation.
Since the time of the Lord's ascension into heaven and His glorification with the Father, he is met on earth in an explicit way only through His body, the Church. As people seek salvation, they will be drawn to Christ and membership in His body. The Church is a sign, a sacrament of God's love. Its task is to witness to the mystery of God's love and salvation in human history through Jesus Christ. Its mandate is to show others the way to Jesus.
Furthermore, Jesus himself taught the need for faith and baptism (John 3:5). Consequently, the Church teaches that anyone who knew "that the Catholic Church was made necessary by God through Jesus Christ, [and] would refuse to enter her or to remain in her could not be saved" (Dogmatic Constitution on the Church, 14).
What about all those many people who have never heard of Jesus Christ? What about those who have been given a distorted picture of him by followers who did not always live what they preached? Can they be saved? The Church answers yes.
"Those can also attain to everlasting salvation who through no fault of their own do not know the gospel of Christ or His Church, yet sincerely seek God and, moved by grace, strive by their deeds to do His will as it is known to them through the dictates of conscience. Nor does divine Providence deny the help necessary for salvation to those who, without blame on their part, have not yet arrived at an explicit knowledge of God, but who strive to live a good life, thanks to his grace. Whatever goodness or truth is found among them is looked upon by the Church as a preparation for the gospel. She regards such qualities as given by Him who enlightens all men so that they may finally have life" (Dogmatic Constitution on the Church, 16).
Thus God's kingdom includes those who are mysteriously drawn to it through the workings of the Holy Spirit in their lives. Their task is to seek the kingdom of God as they know it. Their vocation is to live as lovingly as they possibly can.
However, if a person truly knows and accepts the gospel which has been given to him or her as a gift, then he or she should recognize the necessity of the Church for salvation. For those who have been privileged to receive the gift of faith, it would be seriously wrong to turn away from the Body of Christ, the Church.