The following comes from Raymond F. Collins, I&II Timothy and Titus (Louiseville: 2002), 364-65:
The ritual bath mentioned in the hymn is one of rebirth and renewal. The term palingenesia, “rebirth,” from palin “again,” and ginomai, “to come into being” (genesis, “birth,” being one of its cognates), occurs elsewhere in the New Testament only in Matt 19:28. The term was commonly used in the Hellenistic world of a wide range of human or met human experiences, including the restoration of health, return from exile, the beginning of a new life, the restoration of souls, new life for a people, and the anticipated restoration of the world.
The Corpus Hermeticum, an Alexandrian text written sometime before the end of the third century C.E. and attributed to the “Thrice-Greatest Hermes” (Hermes Trismegistos), says that “no one can be saved before rebirth (Corp. Herm. 13.3). The thirteenth tract of the Corpus features a dialogue between Hermes and his son Tat on the subject of being born again. Speaking to his father in a manner that recalls Nicodemus’s question to Jesus (John 3:4), Tat inquires about rebirth. He understands rebirth to be accomplished in some physical manner and asks his father about the womb and seed. Hermes responds that these are respectively the wisdom of understanding in silence and the true good, sown in a person by the will of God. The child that results is a different king of child, “a god and a child of God” (Corp. Herm. 13.2). Rebirth enables a person to progress in the moral life, turning from twelve vices--ignorance, grief, incontinence, lust, injustice, greed, deceit, envy, treachery, anger, recklessness, and malice--to the opposite virtues (Corp. Herm. 13.7).
Many twentieth-century scholars, particularly those belonging to the history of religions school of New Testament research, attempted to clarify 3:5 in the light of this Hermetic tract. The tract is, however, much later than the Epistle to Titus and lacks any reference to a ritual washing. On the other hand, the late first-century canonical Fourth Gospel features a discourse between Jesus and Nicodemus, a leader of the Pharisees (John 3:3-8), about being “born again” (gennéthe anóthen). The Johannine account does not employ the noun “rebirth” (palingenesia), as does the Corpus, but it does speak about a birth that takes place in water and the Spirit (gennéthé ex hydatos kai pneumatos). The substantive similarities between the Johannine text and 3:5d-e--the references to washing, new birth, and the Spirit--suggest that both of these late first-century texts describe the ritual of Christian baptism as bringing about a new life through the power of the Holy Spirit.