A History of the Whoniverse
Before the Universe
The Beast was imprisoned on the planet later known as Krop Tor by the disciples of light. The planet was set in orbit around a black hole, positioned there by an artificial gravity field, which was set to fall when the beast was let out - sending it into the black hole.
In The Satan Pit, the beast claims that his imprisonment happened before this universe. It is unclear how the prison could have existed "before time" and "before matter" as the beast claims.
The Creation of the Universe
In the previous Universe, there was a race of beings who discovered how preserve themselves past the death of their universe by shunting themselves into a parallel universe and back again. As this Universe had different physical laws to their own, these beings obtained immense powers and became known as the Great Old Ones. The Great Old Ones included Cthulhu, Nyarlathotep, Dagon (worshipped by the Sea Devils), Hastur the Unspeakable (aka Fenric), Shub-Niggurath (who conquered and colonised Polymos with her offspring the Nestene Consciousness), Yog-Shothoth (the Intelligence), the Lloigor (the Animus), Azathoth, Gog and Magog, Malefescent, and Tor-Gasukk. The Gods of Raag, Nah, and Rok, were among those who endured into our universe. They were responsible for the demise of the previous universe, and amused themselves by creating the Land of Fiction - a realm where reality is fluid.
The Great Old Ones are first mentioned in White Darkness and some of them are named in All Consuming Fire. Individual Great Old Ones appear in The Greatest Show in the Galaxy, The Curse of Fenric, The Web Planet, Twilight of the Gods (the Missing Adventure), The Abominable Snowmen and The Web Of Fear. White Darkness describes the Great Old Ones on Earth in terms very reminiscent of the Mandragora Helix (The Masque of Mandragora). Raag, Nah, and Rok are only named separately in Divided Loyalties, where we learn of their destruction of a universe (page 118), this book adds Gog, Magog, Malefescent, and Tor-Gasukk to the list of great old ones.
This Universe began with the Big Bang somewhere around 13,500,017,895 BC. The Doctor probably saw the Universe begin. [It is possible that the Other is a great old one or had close contact with some of them.] The creation of the Universe was kick-started by the engines of Terminus exploding, before being catapulted far into the future.
The Big Bang date is calculated from Transit, page 42 (2117) where the Doctor drunkenly celebrates the Universe's birthday. According to Timewyrm: Apocalypse, it was fifteen [American] billion years ago (page 1), which is confirmed in Falls the Shadow. The Doctor's acquaintance with the beginning of the Universe is hinted at in Destiny of the Daleks and The Curse of Fenric. Terminus' role is mentioned in Terminus.
It began with a cold, dark, emptiness. Then there was light. In less than a millisecond after Event One, the superdense ball of matter that was the Universe exploded. The TARDIS was caught in this vast outrush of simple hydrogen. The Leptonic Era, when elements such as Helium 2 were temporarily possible, occurred soon after Event One.
The hydrogen inrush occurred during Castrovalva. The Leptonic Era is mentioned in Time and the Rani. The first two sentences are from the prologue to Timewyrm: Apocalypse.
The greatest of the Great Old Ones may have become the Guardians. The Black (Chaos) and White (Order) Guardians were charged with maintaining the balance of the universe. There were said to be a total of six guardians, including one of Dreams (probably the Celestial Toymaker) and one of Justice.
We first encounter the Black and White Guardians in The Ribos Operation. The other four Guardians are mentioned in Divided Loyalties. and The Quantum Archangel.
During the next few billion years, stars and their solar systems form. Planets coalesce out of cosmic dust, and primitive molecules form complicated chains which will eventually become life.
Timewyrm: Apocalypse (page 1).
SHORT TRIPS AND SIDE STEPS: GONE TOO SOON
The Sixth Doctor carved THE DOCTOR WAS HERE on the rock of one of the earliest planets.
The Early Races
A number of beings and races came into being in the early days of the universe. These races included the Grey Man's race and the Mandragora Helix. The vampires were also created during this period and the Black Guardian played a role in their creation.
The Grey Man appears in Falls the Shadow and the Mandragora Helix in The Masque of Mandragora. Vampires first appeared in State of Decay, the Black Guardian's role in their creation is mentioned in Goth Opera.
The first civilisation came into being. They were humanoid and developed for ten thousand years before wiping themselves out in a bacteriological war. In response to this, the grey man built the Cathedral, designed to alter the structure of reality. Its interface with reality, the metahedron, was moved from world to world every eighty thousand years.
Falls the Shadow.
Other early races included the Dæmons of Dæmos and the race including Light, Control and Survey.
The Dæmons and Ghost Light.
One particular early civilisation to evolve was that of Gallifrey. This [and possibly some other] early humanoid civilisation[s] established a morphic field for humanoid life forms, making these far more likely to evolve. Gallifrey under the Pythias established a vast galactic empire and, during this period, they involved themselves in the beginnings of the Sontaran/Rutan conflict by trying to solve the original border dispute between these two races. Eventually, the line of Pythias was overthrown by Rassilon, Omega and the Other. They began the Intuitive Revolution, which turned the Gallifreyans into Time Lords. They also fought the Eternal War against enemies such as the Great Old Ones, the Vampires and the Hoothi. Among many races, Rassilon became a legendary figure, his fame spreading even to races who had never heard of the Time Lords. This era of Gallifreyan influence, however, failed to last.
The Hoothi were a fungoid race that lived off decayed matter and who farmed whole worlds, keeping sentient species as herd animals. The Time Lords were trying to negotiate in a war on the planet Tranmetgura, hoping to organise a planetary govenment which they could deal with. However, the Hoothi intervened, taking sides in the conflict. They introduced their dead soldiers (corpses animated by the Hoothi collective consciousness) into the fight. The war escalated, biological agents reducing the Planet's population by two thirds, and the Hoothi harvested all the dead. The Time Lords sent an ambassador to the Hoothi, trying to prevent them from interfering in Time Lord affairs again, but the Hoothi used the ambassador as a host. Their attack on Gallifrey was quickly defeated by superior Time Lord biochemistry. The Time Lords intended to time-loop the Hoothi worlds, but the Hoothi fled the Milky Way before the Time Lords could do so.
The Gallifreyans also fought the Time Wars, erasing from history any race that was expected to evolve a similar mastery of space-time. These included non-humanoid races such as the Charon and the Crialons (who had discovered time travel at the same time as the Time Lords). One race who fought in the Time Wars created Reality Bombs, which can corrupt the control systems of passing time vessels. The Time Lords destroyed most of these, but a few remained hidden for a long time.
Early on in their history, the Time Lords gave technological aid to the Minyans, who used nuclear technology to destroy their planet. After this, the Time Lords [officially] renounced interference in the affairs of other species.
The morphic field comes from Lucifer Rising, Early Gallifreyan history comes from Cat's Cradle: Time's Crucible and Lungbarrow. The Eternal War is mentioned in Time's Crucible and The Pit. The Hoothi appear in Love and War, their war being described on pages 149-150. The Time Wars are mentioned in Sky Pirates! and the Crialans appear in Decalog 3: Timevault. The Minyans appear in Underworld.
One entity that existed in galactic prehistory was a Sentience that was entombed within the planet Earth as it formed. This sentience ran through the planet, but eventually found itself connecting with the surface under a hill in Yorkshire.
According to the Doctor in Nightshade, page 188.
Another such entity would become known as the Ragman. It was entombed within a rock that would eventually arrive on Earth.
According to Rags page 159.