Time of Darkness

According to ancient prophesies on Gallifrey, the Doctor was destined to lead his people out of the Time of Darkness. The Doctor would also unite his people against a great evil facing the universe. Sam Jones unknowingly cited this real prophecy when trying to make up a fake prophecy concerning the Doctor using material from Babylon 5; the Eighth Doctor later earnestly asked her where she'd learned of the prophecy. (PROSE: Unnatural History)

The Supreme Council of Ulysses' era, shortly after the birth of the First Doctor, knew that a Time Lord living at that time would be central to defending Gallifrey from a series of enemies: Omega, the Sontarans, Tannis, Faction Paradox, Varnax, Catavolcus, the Timewyrm, and ultimately the enemy of Last Contact. To do this, this Time Lord would also find the Lost Scrolls of Rassilon and "lead Gallifrey out of darkness". (PROSE: The Gallifrey Chronicles)

A member of Faction Paradox indicated that the Book of Lies predicted a great darkness falling over the universe, but that when it came this "darkness" would look more like "greyness". (PROSE: Unnatural History)

A later source would reveal that a Doctor actually did lead the universe out of the Dark Times. (TV: Once, Upon Time)

Behind the scenes
The general prophecies and concept of the Doctor ending a "Time of Darkness" come from the proposed stories of the Leekley Bible. In that context, the great threat of the Time of Darkness is a version of the Master wielding an army of monsters, known in one prophecy in Fathers and Brothers as "The Enemy". Much of the Leekley Bible remixes prior continuity, with the term "Time of Darkness" seemingly derived from "Dark Time".