In Acts 2 Peter preaches the first sermon of the New Testament era, and his audience comes under the conviction of the Holy Spirit. Faced with the enormity of their sin, they "said to Peter and the rest of the apostles, 'Brothers what shall we do?' And Peter said to them, 'Repent and be baptized every one of you in the name of Jesus Christ for the forgiveness of your sins, and you will receive the gift of the Holy Spirit. For the promise is for you and for your children and for all who are far off, everyone whom the Lord our God calls to himself'" (vv.37b-39).
Those who believe what Scripture says about baptism are often challenged with the question: "Well, if baptism is the 'washing of regeneration,' what about the person who believes before he is baptized? Isn’t he saved when he comes to faith? And if he comes to faith before he is baptized, then baptism can’t possibly save him, right? Baptism can’t save a person who is already saved!"
Where is that argument coming from? What is its basis? This a rational objection rooted in a strictly linear understanding of time. If we have an event, which by its definition is a unique event, it can only happen at one point in time. We are only born once. We only die once. When a baby emerges from the birth canal, there is no going back. When the chord is cut and the first gasp of air is breathed, that event never happens again.
How shall we respond? Look at Acts 2. Why do the people ask Peter their desperate question, "Brothers, what shall we do?" It is because they have heard and believed the words that Peter spoke. When Peter said, "Let all the house of Israel therefore know for certain that God has made him both Lord and Christ this Jesus whom you crucified," they believed his word. The Law had done its work. Peter's answer to the question was the Gospel. Those who believed received the gifts Peter promised in baptism -- the forgiveness of your sins and the gift of the Holy Spirit.
If you want to chart these events on a timeline, the 3,000 baptized on the Day of Pentecost went to baptism because they believed. So, they were saved before they passed under the water. But Peter did not say, "Be baptized and you will receive the gift of the Holy Spirit, unless you already have faith, in which case you already have what baptism would otherwise give, and your baptism is just a symbol of your faith in Christ." You won't find that teaching in the Bible, because the linear nature of time does not and cannot nullify any of God's promises.
What baptism is and what baptism accomplishes does not depend in any way on its relative position in the chronology of your personal testimony.