Necromancer

the Necromancer is an obscure villainous entity mentioned fleetingly by Gandalf as one of the dangers of the wider world. He is peripheral to the plot of the book: explaining why the company takes the dangerous road though Mirkwood rather than going around, and providing a reason for Gandalf's absence for that section of the journey. Thematically the Necromancer, a truly 'terrible' force beyond the power of the main protagonists, gives the world of The Hobbit a greater level of reality which Tolkien felt was necessary for a "fairy-tale" to ring true.
Despite the alias it would appear that the Necromancer was always intended to stand for Sauron, a figure from the very earliest phases of his legendarium (as Tevildo in "The Tale of Tinúviel"). 
Indeed, in the Lay of Leithian, Thû is called a "necromancer" who "held his hosts of phantoms and of wandering ghosts" (l. 2075) in Tol-in-Gaurhoth.
However, as The Hobbit was not originally intended to be integrated with Tolkien's wider mythology the Necromancer did not necessarily need to be consistent with his First Age counterpart Sauron, rather the two were loosely linked to add an 'impression of depth' to the narrative of The Hobbit. With Tolkien's decision to merge the two 'worlds' and make Sauron the central antagonist Lord of the Rings came the need to reconcile the two figures and account for his whereabouts in the millennia between the end of the First Age and his dwelling in Bilbo's Mirkwood. This was largely achieved in the Tale of Years, with Sauron becoming a much greater figure after the fall of his master, one who arguably drove the history of the entire Second and Third Ages of Middle-earth.
Fans have noted that the alias "Necromancer" for Sauron is obscure, as in the context of neither The Hobbit nor The Lord of the Rings Sauron is ever specifically mentioned to use necromancy, i.e. controlling the spirits of the dead.
A later essay mentions the practice of necromancy concerning the fëar of the Unbodied Elves, mentioning that Sauron possibly did so and also taught his followers, although this reference isn't given in context of the story.