The 2nd-century philosopher Valentinus studied in Alexandria, Egypt and became an influential theologian in the orthodox Christian community of Rome. He aspired to be bishop of Rome, but was edged out by a rival who had the advantage of having been nearly martyred. Disappointed, Valentinus left the Church hierarchy around 140 AD. But not before he had formulated an idea that was the precursor to the Christian concept of the Divine Trinity.
Prior to his conversion to Christianity, Valentinus was a Gnostic ("Knower"), and claimed to have secret knowledge handed down from Jesus. According to his preaching, God had sent forth 181 pairs of divine beings, with each pair producing the next until finally there was Demiurge ("Creator"), who created the world and the first man, Adam. But Demiurge couldn't bring Adam to life without divine light from heaven, which he stole and injected into Adam. These sparks of light were passed on to the human race as the souls of an elite few.
God then sent the Christ, one of 365 heavenly beings, to Earth, where he inhabited the body of Jesus. Valentinus preached that Jesus' goal was to teach the elite who they really were. By simply knowing this (hence "Gnostics"), the elite would be admitted to heaven. The man Jesus, Christ's "channeler" who died on the cross, redeemed the rest of humanity. Valentinus thus understood Christ and Jesus as two separate but unified beings.
Followers of Valentinus organized in small groups among Catholic congregations, and were very secretive. Valentinus died around 160 AD, but his doctrine spread throughout the Roman Empire. When the first Christian Emperor, Constantine, came to power in the 4th century, Valentinians were persecuted as heretics. But Valentinus's idea of a plurality of persons in the Godhead survived, and was codified centuries later as the orthodox Catholic doctrine of the Trinity--the unity of Father, Son, and the Holy Spirit in one, divine God.