Theodosius was the son of one of Emperor Valentinian I's generals, Theodosius the Elder. Theodosius the elder probably secured for his twenty-something son the position of dux Moesiae (Ammianus Marcellinus 29.6.15). Dux (from which, 'duke') Theodosius defeated the Sarmatians in 374. In 375 his father was executed. The younger Theodosius had cautiously retired from public life to his home in Cauca, Spain, emerging from it, according to a 5th century ecclesiastical historian, Theodoret of Cyrrhus, when Emperor Gratian summoned him to deal with a Balkan emergency. Gratian wanted Theodosius to clean up after Emperor Valens' defeat at Adrianople in August 378.
Michael Kulikowski, author of the information-loaded Rome's Gothic Wars, and the source for this article, says Gratian may not actually have been responsible for Theodosius' elevation to the imperial purple. The troops may have elevated their leader, instead, in a bloodless coup, making Theodosius emperor on January 19, 379. Regardless of how Theodosius came to power, Gratian accepted him, allotting him the Balkan mess and the eastern part of the Empire. If Theodosius couldn't fix it, the failure would rest on his shoulders, not Gratian's.
Almost two years after his elevation, Theodosius was finally able to enter Constantinople, which he turned into the capital of the East. During the intervening period, Theodosius tried to recruit new forces to make up for the 16 units Valens permanently lost at Adrianople. He had trouble and wound up recruiting farmers. Gratian offered no help. Cutting his losses, Theodosius decided to come to peace terms with the Goths on October 3, 382. He gave land to the Goths, and Gothic soldiers, many of whom had been among the victors at Adrianople, joined Theodosius' imperial forces. This meant Gothic aristocrats, who no longer had their ancestral sources of power, could instead have careers in the imperial army. Those Gothic tribal kings who had been causing so much trouble for Valens and then, Theodosius, disappear from the historical record at this point.
For more on Theodosius the Great's imperial career, see Theodosius I.
*Theodosius didn't always have a stellar rapport with the Church. St. Ambrose excommunicated him in 390 for ordering a massacre in Thessalonica, but Theodosius did his penance.