Not all Protestant churches dispute the importance of baptism, only the more radical ones do. But it is also true that Protestant churches generally fail to see the ontological significance and symbolism of the sacramental economy, which is “the communication or dispensation of the fruits of Christ’s Paschal mystery in the celebration of the Church’s ‘sacramental’ liturgy” (CCC 1076). In other words, they do not believe the use of visible signs and symbols such as water, oil, incense, bread, wine, etc. in the liturgy can communicate and make present efficaciously invisible graces wrought by Christ’s Paschal sacrifice. With this critical belief abandoned, no wonder many of them see the Catholic Church’s use of sacraments as a form of superstition or even idolatry.
The efficacy of sacraments is affirmed by Christ and the apostles on many different occasions. As far as the sacrament of baptism Jesus confirms its necessity in John 3:5, as you pointed out; he commands his disciples to proclaim the Gospel to all nations and to baptize them in the name of the Father, and of the Son, and of the Holy Spirit (Matthew 28:19); he also promises salvation if one believes and receives baptism (Mark 16:16).
Not only does the necessity of baptism have the support of Jesus himself, it’s of such paramount importance in the overall economy of salvation that its institution was already anticipated, foretold and prefigured in the great events of salvation history. The Noah’s ark, for example, is a prefiguring of salvation by baptism in the sense that people were saved through water and in the process a world corrupted by sin was purified and transformed to become a new creation (cf. CCC 1219). Similarly, the Exodus event signifies our liberation from the slavery of sin through water just as Israel was liberated from the slavery of Egypt through the crossing of the Red Sea (cf. CCC 1221). The need for purification and the symbolic efficacy of water as a source of life were already evident and emphasized in the Mosaic law of purification (cf. Numbers 19:11 ff).
If you think Mel Gibson was exaggerating when the blood and water that gushed out of Jesus pierced side were depicted to look like a heavy downpour, it’s because the redemptive and purifying grace of Jesus’ blood and water was what all of humanity had been waiting and yearning for ever since our first parents fell into Satan’s trap. When compared to the prophet Ezekiel’s vision of water flowing out of the threshold of the temple (Ezekiel 47:1-12), which is also a prefiguration and anticipation of the powerful baptismal, life and Spirit giving water that Jesus would bring, the fore-mentioned scene in the Passion of the Christ is actually quite an understatement!
Quoting Mark 16:16 (“Whoever believes and is baptized will be saved”), the Catechism reaffirms in no unclear terms that baptism “is necessary for salvation for those to whom the Gospel has been proclaimed and who have had the possibility of asking for this sacrament” (CCC 1257).
That said, it must not be forgotten that while the Sacrament of baptism is a wonderful gift from God to help us live in sanctification, salvation for those who have been baptized is far from guaranteed. “Even though incorporated into the Church, one who does not however persevere in charity is not saved,” the Vatican II Fathers warned in Lumen Gentium 14. For it’s “not everyone who says to me, 'Lord, Lord,' will enter the kingdom of heaven, but only the one who does the will of my Father in heaven” (Matthews 7:21, also see James 2:24). In fact, if even St. Paul was unsure he would ultimately stand acquitted before the judgment of God (cf. 1 Corinthians 4:3-4), who are we to boast of the certainty of our salvation just because we have been baptized?
At this point of our discussion, it’s only logical to ask this question: If baptism is needed for salvation, what do we say about all the good people from other religions and those with no particular religious belief? Do they have any hope of being saved? This will lead us nicely into the next discussion. Please stay tuned for Part 3 of this serial topic.