First, it is quite clear from such passages as Acts 15 and Romans 4 that no external act is necessary for salvation. Salvation is by divine grace through faith alone (Romans 3:22, 24, 25, 26, 28, 30; 4:5; Galatians 2:16; Ephesians 2:8-9; Philippians 3:9, etc.).
If water baptism were necessary for salvation, we would expect to find it stressed whenever the gospel is presented in Scripture. That is not the case, however. Peter mentioned baptism in his sermon on the day of Pentecost (Acts 2:38). However, in his sermon from Solomon's portico in the Temple (Acts 3:12-26), Peter makes no reference to baptism, but links forgiveness of sin to repentance (3:19). If baptism is necessary for the forgiveness of sin, why didn't Peter say so in Acts 3?
Paul never made water baptism any part of his gospel presentations. In 1 Corinthians 15:1-4, Paul gives a concise summary of the gospel message he preached. There is no mention of baptism. In 1 Corinthians 1:17, Paul states that "Christ did not send me to baptize, but to preach the gospel," thus clearly differentiating the gospel from baptism.
Those passages are difficult to understand if water baptism is necessary for salvation. If baptism were part of the gospel itself, necessary for salvation, what good would it have done Paul to preach the gospel, but not baptize? No one would have been saved. Paul clearly understood water baptism to be separate from the gospel, and hence in no way efficacious for salvation.
Perhaps the most convincing refutation of the view that baptism is necessary for salvation are those who were saved apart from baptism. The penitent woman (Luke 7:37-50), the paralytic man (Matthew 9:2), the publican (Luke 18:13-14), and the thief on the cross (Luke 23:39-43) all experienced forgiveness of sins apart from baptism. For that matter, we have no record of the apostles' being baptized, yet Jesus pronounced them clean of their sins (John 15:3--note that the Word of God, not baptism, is what cleansed them).
The Bible also gives us an example of people who were saved before being baptized. In Acts 10:44-48, Cornelius and those with him were converted through Peter's message. That they were saved before being baptized is evident from their reception of the Holy Spirit (v. 44) and the gifts of the Spirit (v. 46) before their baptism. Indeed, it is the fact that they had received the Holy Spirit (and hence were saved) that led Peter to baptize them (cf. v. 47).
One of the basic principles of biblical interpretation is the analogia scriptura, the analogy of Scripture--we must compare Scripture with Scripture in order to understand its full and proper sense. Since the Bible doesn't contradict itself, any interpretation of a specific passage that contradicts the general teaching of the Bible is to be rejected.
Since the general teaching of the Bible is, as we have seen, that baptism and other forms of ritual are not necessary for salvation, no individual passage could teach otherwise. Thus we must look for interpretations of those passages that will be in harmony with the general teaching of Scripture.
With that in mind, let's look briefly at some passages that appear to teach that baptism is required for salvation.
In Acts 2:38, Peter appears to link forgiveness of sins to baptism. But there are several plausible interpretations of this verse that do not connect forgiveness of sin with baptism. It is possible to translate the Greek preposition eis--"because of," or "on the basis of," instead of "for." It is used in that sense in Matthew 3:11; 12:41; and Luke 11:32.
It is also possible to take the clause "and let each of you be baptized in the name of Jesus Christ" as parenthetical. Support for that interpretation comes from that fact that "repent" and "your" are plural, while "be baptized" is singular, thus setting it off from the rest of the sentence. If that interpretation is correct, the verse would read "Repent (and let each of you be baptized in the name of Jesus Christ) for the forgiveness of your sins." Forgiveness is thus connected with repentance, not baptism, in keeping with the consistent teaching of the New Testament (cf. Luke 24:47; John 3:18; Acts 5:31; 10:43; 13:38; 26:18; Ephesians 5:26).
A third possibility exists, as Wallace explains in Greek Grammar Beyond the Basics:
It is possible that to a first-century Jewish audience (as well as to Peter), the idea of baptism might incorporate both the spiritual reality and the physical symbol. In other words, when one spoke of baptism, he usually meant both ideas--the reality and the ritual. Peter is shown to make the strong connection between these two in chapters 10 and 11. In 11:15-16 he recounts the conversion of Cornelius and friends, pointing out that at the point of their conversion they were baptized by the Holy Spirit. After he had seen this, he declared, "Surely no one can refuse the water for these to be baptized who have received the Holy Spirit..." (10:47).
The point seems to be that if they have had the internal testimony of the Holy Spirit via spiritual baptism, there ought to be a public testimony/acknowledgment via water baptism as well. This may not only explain Acts 2:38 (viz., that Peter spoke of both reality and picture, though only the reality removes sins), but also why the NT speaks of only baptized believers (as far as we can tell): Water baptism is not a cause of salvation, but a picture; and as such it serves both as a public acknowledgment (by those present) and a public confession (by the convert) that one has been Spirit-baptized.
Mark 16:16, a verse often quoted to prove baptism is necessary for salvation, is actually a proof of the opposite. Notice that the basis for condemnation in that verse is not the failure to be baptized, but only the failure to believe. Baptism is mentioned in the first part of the verse because it was the outward symbol that always accompanied the inward belief.
Water baptism does not seem to be what Peter has in view in 1 Peter 3:21. The English word "baptism" is simply a transliteration of the Greek word baptizo, which means "to immerse." Baptizo does not always refer to water baptism in the New Testament (cf. Matthew 3:11; Mark 1:8; 7:4; 10:38-39; Luke 3:16; 11:38; 12:50; John 1:33; Acts 1:5; 11:16; 1 Corinthians 10:2; 12:13).
So Peter is not talking about immersion in water, as the phrase "not the removal of dirt from the flesh" indicates. He is referring to immersion in Christ's death and resurrection through "an appeal to God for a good conscience," or repentance. Again, it is not the outward act that saves, but the internal reality of the Spirit's regenerating work (cf. Titus 3:4-8).
I also do not believe water baptism is in view in Romans 6 or Galatians 3. I see in those passages a reference to the baptism in the Holy Spirit (cf. 1 Corinthians 12:13). For a detailed exposition of those passages, I refer you to my commentaries on Galatians and Romans, or the transcripts my sermons on Galatians 3 and Romans 6.
In Acts 22:16, Paul recounts the words of Ananias to him following his experience on the Damascus road: "Arise, and be baptized, and wash away your sins, calling on His name." It is best to connect the phrase "wash away your sins" with "calling on His name." If we connect it with "be baptized," the Greek participle epikalesamenos ("calling") would have no antecedent. Paul's sins were washed away not by baptism, but by calling on His name. Water baptism is certainly important, and required of every believer. However, the New Testament does not teach that baptism is necessary for salvation.