Romans 6 is the classic understanding of what constitutes baptism. When we are baptised, we share in the life, death and resurrection of Christ. It is through the water and the Spirit John 3:5 that we are born from above. This is called regeneration of the believer. Acts 2:38 also Peter preached salvation in Christ through being baptized and receiving the gift of the Holy Spirit.
One cannot receive the gift of the Holy Spirit unless one is water baptised. Water baptism is entrance into the Kingdom of God. Entrance into the Kingdom warrants the gift of the Holy Spirit. One follows the other.
The text of Titus 3:5 affirms that very idea. The washing of regeneration and the gift of the Holy Spirit.