This is yet another controversial topic. Some say is a commandment/requirement, while others say is optional. What saith the scripture?
In Mark 16:16 it says:
"He that believeth and is baptized shall be saved."
Why don't we take a brief look at some of the examples from the book of Acts and see if they who believed (the Gospel) were baptized or if it was optional.
Acts 2:38 & 41
Then Peter said unto them, Repent, and be baptized every one of you in the name of Jesus Christ for the remission of sins, and ye shall receive the gift of the Holy Ghost.
***to repent, you first need to believe (the Gospel).
Acts 2:41
"Then they that gladly received his word were baptized: and the same day there were added unto them about three thousand souls.
In Acts 10:48
"And he commanded them to be baptized in the name of the Lord. Then prayed they him to tarry certain days."
*** see Acts 10:44 "While Peter yet spake these words, the Holy Ghost fell on all them which heard the word."
Acts 8 :36-37
35 Then Philip opened his mouth, and began at the same scripture, and preached unto him Jesus.
36 And as they went on their way, they came unto a certain water: and the eunuch said, See, here is water; what doth hinder me to be baptized?
37And Philip said, If thou believest with all thine heart, thou mayest. And he answered and said, I believe that Jesus Christ is the Son of God. 38 And he commanded the chariot to stand still: and they went down both into the water, both Philip and the eunuch; and he baptized him.
***Did you noticed how it was the Eunuch who asked the question about baptism?, that means Philip must of told him that baptism was necessary when he was preaching the word to to the Eunuch.
Acts 16:30-34
30 And brought them out, and said, Sirs, what must I do to be saved?
*** this is in reference to the jailer asking the question
31And they said, Believe on the Lord Jesus Christ, and thou shalt be saved, and thy house.
*** Paul and Silas replied Believe (in the Gospel/the Word, NOT in the name itself.) To believe is to repent, to obey, to be baptized, or else, how is the jailer going to be baptized if he does not repent and believe in everything that Jesus taught and preached.
32And they spake unto him the word of the Lord, and to all that were in his house.
*** the jailer receives the word (believes) before he is baptized. Now, here is where it gets bumpy for them that believe in infant baptism, because it says (and to all that were in his house), but did you notice the word (and) that means that Paul and Silas preached the Word to other members of the jailers house, and whoever they may be, they had to hear the Gospel and believe as well. unless we are to believe that an infant or a child can repent and believe? although we don't know who these member are, we do know that they had to believe.
33And he took them the same hour of the night, and washed their stripes; and was baptized, he and all his, straightway.
*** Again, believing comes first before water baptism.
34And when he had brought them into his house, he set meat before them, and rejoiced, believing in God with all his house.
*** Both the jailer and his house believed and rejoiced in God. Can an infant do this?
And Finally,
Paul gets Baptized as well
Acts 9:16
16 And Ananias went his way, and entered into the house; and putting his hands on him said, Brother Saul, the Lord, even Jesus, that appeared unto thee in the way as thou camest, hath sent me, that thou mightest receive thy sight, and be filled with the Holy Ghost.
*** Paul was first called Saul
17 And immediately there fell from his eyes as it had been scales: and he received sight forthwith, and arose, and was baptized."
And there are a few more other verses, but I think these would suffice. As you can see brothers, Baptism is part of your salvation, it is an error to say that it is a work. Please, do not challenge one verse of scripture with another verse; for scriptures are in perfect harmony. We need to study and interpret the verses correctly to avoid confusion.
-May the love of God, and Grace of our Lord, and the communion of the Holy Spirit be with you all.