Is Baptism necessary for Salvation (Acts 19:1-6)

Is baptism, with water or the Holy Spirit necessary for salvation?
In one word, No!
Paul found some people The Bible calls disciples of Jesus, so they must been followers of Jesus.

(Act 19:1)  And it came to pass, while Apollo was at Corinth, that Paul, having passed through the upper coasts, came to Ephesus and found certain disciples.

They had not even heard of the Holy Ghost or His Ministry but were still followers of Jesus

(Act. 19:2)  And he said to them: Have you received the Holy Ghost since ye believed? But they said to him: We have not so much as heard whether there be a Holy Ghost.

They had been baptized with the baptism of John which identified them originally as followers of John but who now followed Jesus.

(Act 19:3)  And he said: In what then were you baptized? Who said: In John’s baptism.
(Act 19:4)  Then Paul said: John baptized the people with the baptism of penance saying: That they should believe in him, who was to come after him, that is to say, in Jesus.

They were the baptized with the baptism of Jesus to identify them as a follower of Jesus.  This was a result of salvation and not a part of it or a cause of it.

(Act 19:5)  Having heard these things, they were baptized in the name of the Lord Jesus.

They next received the baptism of the Holy Spirit.

(Act 19:6)  And when Paul had imposed his hands on them, the Holy Ghost came upon them: and they spoke with tongues and prophesied.

It can be seen that both baptisms were well after their salvation and commitment to follow Jesus as their Lord.
These disciples were followers of Jesus, who had never heard of the Holy Spirit and had only been baptized by John but who were saved because of their faith in Jesus as their Lord.  Both baptisms were after their salvation so it is obvious that any baptism is not necessary for salvation.
To be saved you need to voluntarily follow Jesus as total Lord of your life!  If you do, but you have an erroneous belief about salvation or doctrine that you do not know is wrong, then your salvation is not an affected.  Once you know the belief is wrong and do not repent of it, as long as it is not disobedience to the Bible in any way it will still not affect your salvation unless it becomes an Idol.  If the belief is one that the Bible declares is wrong, to continue to keep it becomes disobedience to God and may result in the loss of salvation.
The Problem of Acts 2:38
This is implied by Acts 2:38:

Acts 2:38 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.

So is baptism with water necessary for salvation?
The short answer is No!
It is the Blood of Jesus that alone gives remission from sin that allows us to approach God (salvation):

Matt 26: 28  For this is my blood of the new testament, which is shed for many for the remission of sins.

The repentant thief on  the cross went to heaven, He would not have been allowed to come down from the cross to be baptized so would have died unbaptised.

Luke 23:43  And Jesus said unto him, Verily I say unto thee, To day shalt thou be with me in paradise.

So Baptism with water is not necessary for salvation or the thief would not have been saved by his confession on the cross.
In this verse Peter was not saying you needed to be baptised to be saved but that you faith in Jesus would be evidenced by this Baptism and that remission of sins would be the result of your declaration of faith.  Baptism, in those days, in a sense was the final statement of your belief in a who you believed in which was then evidenced by your lifestyle.  But the baptism was a result of your salvation belief and not a cause of it so that it resulted from your salvation belief and was not a cause of your salvation belief (Rom 10:9-10).
Why redemption cannot occur through Baptism
Sins were not just forgiven at Calvary. They were remitted as if they had never occurred.  If they had only been forgiven then the defilement of sin would still have been on us so we still could not have entered The Kingdom of God!

Romans 3:25  Whom God hath set forth [to be] a propitiation through faith in his blood, to declare his righteousness for the remission of sins that are past, through the forbearance of God;
Hebrews 9:22  And almost all things are by the law purged with blood; and without shedding of blood is no remission.
Hebrews 10:18  Now where remission of these [is, there is] no more offering for sin.

Baptism does nothing to remove The defilement of sin as no blood is shed in the ceremony so it cannot redeem you!
Once sin has been remitted there is no need to ask for forgiveness for it as God relates to you as if you had never sinned at all.  The Father sees you as a redeemed person in a proper relationship with Him and not as someone defiled and under the condemnation of sin.
As Jesus died once for all sin, so any sins past, present or future have been remitted so that we do not need to ask for forgiveness for them as Jesus has dealt with them already at Calvary.  We do, however have to repent of them (turn from what we were doing wrong toward what Jesus wants us to do) as a requirement of working at the obedience necessary on our part of the salvation arrangement with Jesus as our Lord.

1Timothy 2:6  Who gave himself a ransom for all…

If Jesus had not died for all the consequences of sin then redemption would not have been complete and we would still be undefiled and unable to enter The Kingdom of God.  But Jesus was God and so infinite and was able to cover all sin anywhere in creation and committed at any time before, during or after His death, through His death on earth at Calvary.
In regard to Baptism and Salvation
Baptism occurs after salvation and does nothing to remove The defilement of sin so it cannot redeem you! If we had any part in salvation then our defilement would have polluted it so that, while we may be saved we could not enter The Kingdom of God and God would have to find another way to save us that we had no part in so that we would not defile it with our participation.   If we had to do something it would also adds a works basis to salvation so it is no longer a salvation, by faith alone resulting from God’s Loving Grace.
You can see we can have no place in redemption or salvation and that baptism, as it would involve us in our defiled state can really have no place in salvation.
If salvation was not complete when we were baptized we would still be defiled and that would mean salvation could only occur after baptism and The Bible was in error saying blood of Jesus alone could redeem and save.  It would also mean it was not God’s Word as it has error so could not be trusted for anything doctrinal.  It would also mean that Jesus was not God as He lied about blood alone being required and could not be the Saviour.
Those who believe baptism is necessary for salvation are saying Jesus was not sufficient and obviously do not believe He was GOd or they would not attack His divinity and redemption by adding to what is required for redemption and this salvation.
You are still saved if you believe that baptism is necessary for salvation as it does not affect salvation being something man has added which is done, they believe, out of obedience to Jesus.  The danger is that it may lead to legalism and a lack of love to others as you try to convince them baptism is necessary for salvation and this lack of love is then sin.
Receiving The Holy Spirit does not occur through baptism

Acts 2:38 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.

This verse also implies Baptism is necessary for receiving The Holy Ghost.
Is Baptism necessary for receiving The Holy Ghost?
The Holy Ghost is given at Salvation to replace the demons in your spirit and by this mark you as no longer defiled and that you belong to Jesus.

Rom 8:16-17 The Spirit itself beareth witness with our spirit, that we are the children of God: And if children, then heirs; heirs of God, and joint-heirs with Christ;

Baptism just confirms our identification with Jesus and is promoted by The Holy Spirit in us, The Holy Ghost in us confirming we belong to Jesus  You will not do the things of Jesus such as baptism and following Him in complete obedience (or at least trying too) if you do not have The Holy Ghost in you guiding you, teaching you and showing  you what to do.  His entrance is at Salvation and is part of the preparation for Baptism of The Spirit at a later date where we are anointed and authorised for ministry.
This shows that the salvation decision has already been made when you are baptised as you have received The Holy Spirit to mark you as Jesus and it is He that prompts you to be baptised.
Note also the passage of Acts 19 quoted in the beginning of this chapter where people were called followers of Jesus and had not even heard of The Holy Spirit let alone been anointed by Him for ministry.
What is Baptism then?
It is the act  of a good conscience towards God, which can only occur when Jesus is  lord (which is a result of the salvation decision to follow Jesus).

1 Peter 3:21. The like figure whereunto [even] baptism doth also now save us (not the putting away of the filth of the flesh, but the answer of a good conscience toward God,) by the resurrection of Jesus Christ:

It is identification with Jesus as Saviour as well as declaring your commitment to Him  It is a confession before man and spirit you are following Jesus as lord!
As Peter says, it does not remove the defilement of sin (not the putting away of the filth of the flesh) so it does not redeem us but is our response to salvation (but the answer of a good conscience toward God).
A note on sprinkling and dunking
Because baptism is not necessary for salvation, it does not matter if the person is sprinkled on dunked providing the person has made a confession of faith at the baptism.  This is because baptism is the demonstration of following Jesus and He is to be confessed as Lord at baptism.
As baptism is only a confirmation of a decision to follow Jesus as Lord as well as a public confirmation of a person’s faith it does not matter if a person is sprinkled or dunked.  It is the public, voluntary identification with Jesus that is important in baptism and not the way it is carried out (sprinkled or dunked). See Rom 10:9, and Acts19 1-5.
It is the public confession of Jesus that is important (Rom 10:9–10) and not the religious or other act that is usually considered important to such a degree that verbal wars are fought over it.  God is looking at the heart of the person and their declaration of faith an not whether they are sprinkled or dunked. The problem with being sprinkled is that it makes it very hard to rise up into newness of life, which symbolism is more easily done when a person is dunked.  To argue a person needs to be dunked rather sprinkled is really unnecessary.  The Saints of the Old Testament were not baptized and were justified purely by faith.
So in reality, for the purposes of salvation, it does not matter if a person is sprinkled or dunked as long as they publicly confess Jesus as Lord and truly try to follow Him and all they do.
Infant baptism
As long as the child has made a decision to follow Jesus as Lord and is voluntarily baptised as an expression of this faith then it is acceptable to God.  Otherwise it is only an empty ceremony as it is not the confession of a good conscience towards God.
It may be used to dedicate a child to God as was done in the temple when the child was presented to God but it has no purpose in regards to salvation.
Salvation is a voluntary decision and not one made by others on your behalf as happens when infant baptism is considered necessary to be saved or be a member of a church.
Baptism for the dead is a useless exercise.
Salvation occurs through believing in your heart who Jesus is and what he has said and done and then telling others about Jesus.  Baptism for the dead is not part of the requirements for salvation.  Also, it does not affect the heart belief of a person or their personal confession of faith so cannot influence their salvation.  
When you die you face immediate judgment so any baptism for the dead cannot affect this as it is done after the person has been judged and sent either to heaven or hell.
Why then is it mentioned by Paul in 1 Cor 15:29?

Else what shall they do which are baptized for the dead, if the dead rise not at all? why are they then baptized for the dead?

In this verse, Paul was commenting that the heathen baptize people because they believed in life after death.  How much more should a Christian believe in life after death especially since Jesus rose form the dead and was seen by over 500 people after his resurrection.
This verse does not refer to salvation but the fact that non-Christians also believe in life after death.
Note that Satan does not stop people believing in life after death but has placed his own scenario of what it is and how to get there in place of tat in The Bible.  Through this he places a more palatable version before people and robs Jesus of them because Christians do not show that what Satan offers is incorrect.