Guardian of Magic

According to a Time Lord fairy-tale which the Tenth Doctor and Donna Noble discovered to be broadly correct, the Guardian of Magic, Morgwen, was a powerful entity from before the universe who was a champion of Chaos, locked in conflict with Arthur, the Guardian of Might, who championed Order.

After their fighting destroyed many galaxies, the Champion of Neutrality, who was the original Merlin, proposed a solution: the two Guardians would cease fighting directly and instead use their power to influence mortals to fight in their names, without realising the true significance of their deeds. They chose the medieval kingdom of Camelot, taking King Arthur and Morgaine as their representatives respectively. However, Morgwen had power over time and kept resetting the game when Arthur came close to winning. This resulted in a litany of iterations of the story of King Arthur and Morgan Le Fey, all of them slightly different, which echoed in the folklore of humanity; while Arthur remained broadly the same, Morgwen kept altering the nature of her counterpart, who went through many names such as Morgan, Morgane and Morgaine, and occupied different places in Arthur's life.

Eventually, the Champion of Neutrality saw no other recourse but to shrink the Guardians' dimension around them until it became the Druse, a sealed crystal chamber in the void between worlds, where the two Guardians were locked in eternal sleep, dreaming that they were still playing the game; to stabilise his trap, Merlin consigned himself to the same slumber. However, there were cracks in the Druse, and the dreams continued to influence events in Camelot, which took on an existence as a parallel dimension linked to the regular England by a rift in Carbury. The Doctor believed that the Morgaine he encountered in his seventh incarnation had been influenced by Morgwen's dreams during this period. At any rate, seeking to escape the Druse, Morgwen used the lingering link to fully transplant her mind into the "finale" Morgaine, one Elainebiding her time. (PROSE: Legends of Camelot)

Behind the scenes
Although Legends of Camelot refers to the Guardian of Magic and the Guardian of Might as "the Guardians", it does not appear to be referring to the Guardians of Time: when Donna Noble asks the Doctor, point-blank, if there is such a thing as a "Guardian of Time" to match the Guardian of Might and Guardian of Magic, he tells her that the closest thing would have to be Rassilon.