How did Christianity become the official religion in ancient Rome?
This is a great question. Christianity became the official religion in Rome gradually. At first, it was a small Jewish sect, but in time they separated from Judaism. Christians believed that Jesus was the long awaited Messiah. At first, Rome did not really take notice, but Christianity began to grow in the cities of Asia Minor and a few other places.
The Romans persecuted Christians at certain junctures due to social concerns. The three biggest persecutions were under Nero, Domitian, and Decius. After these persecutions lifted, Christianity gained more traction. In a word, the religion was growing.
However, Christianity became the main religion through Emperor Constantine. According to Eusebius, Constantine had a vision where God appeared to him and promised victory over Lactantius, his foe. He saw the symbol of the chi rho in Greek, which spelled the first three letters of the name, Christ.
After he defeated Lactantius, he gave special privileges to Christians and in time it continued to grow. There was a set back when Julian became emperor, but it was too late. By this time, Christianity had grown too much.