First of all, the Necromancer was always intended by Tolkien to be Sauron (who was at the time named Thû). The most explicit evidence is to be found in the History of the Hobbit, when the Necromancer is first mentioned, and reads:
"Don't be absurd" said the wizard. "That is a job quite beyond the powers of all the dwarves, if they could be all gathered together again from the four corners of the world. And anyway his castle stands no more and he is flown to another darker place - Beren and Tinúviel broke his power, but that is quite another story."
(My emphasis)
There's also reference in the Lay of Leithian ("Men called him Thû...In glamoury
that necromancer held his hosts"), as well as in the pre-LotR Letter 19 ("even Sauron the terrible peeped over the edge") - of course the full concept of the Rings of Power only emerged during the writing of LotR, but other ideas - such as Sauron's survival beyond the First Age, the Fall of Numenor (where Sauron is explicitly identified as being the same character as Thû), the Last Alliance, Sauron's lairs in Mordor and Mirkwood, the name "Sauron" itself - had already emerged and gone through several revisions before the Hobbit was even published.
As for why he's called a "Necromancer", the most obvious early explanation comes in the quoted lines from the Lay of Leithian, and I'll give them again in full:
Men called him Thû, and as a god
in after days beneath his rod
bewildered bowed to him, and made
his ghastly temples in the shade.
Not yet by men enthralled adored,
now was he Morgoth's mightiest lord,
Master of Wolves, whose shivering howl
for ever echoed in the hills, and foul
enchantments and dark sigaldry
did weave and wield. In glamoury
that necromancer held his hosts
of phantoms and of wandering ghosts...
This however does nothing much more than establish that Sauron/Thû was called a Necromancer, but doesn't go into much detail about what exactly he did. For that we need to look to a later text, published in HoME 10 (Morgoth's Ring) and again I'll quote in full (with some added emphasis):
It is therefore a foolish and perilous thing, besides being a wrong deed forbidden justly by the appointed Rulers of Arda, if the Living seek to commune with the Unbodied, though the houseless may desire it, especially the most unworthy among them. For the Unbodied, wandering in the world, are those who at the least have refused the door of life and remain in regret and self-pity. Some are filled with bitterness, grievance, and envy. Some were enslaved by the Dark Lord and do his work still, though he himself is gone. They will not speak truth or wisdom. To call on them is folly. To attempt to master them and to make them servants of one own's will is wickedness. Such practices are of Morgoth; and the necromancers are of the host of Sauron his servant.
So there we have it: Sauron/Thû communed with spirits of the dead, mastered them and made them his servants.