To understand this you need to understand the order in which the stories were written and the order in which the various concepts in them came about.
First of all, Tolkien had always intended that the Necromancer be Sauron (who was, at the time, called Thû) when The Hobbit was first written; see the History of the Hobbit and, in particular, the comment that "Beren and Lúthien broke his power long ago" in an early draft: the Necromancer was always intended to be Sauron/Thû, and this intention predates LotR.
The concept of Sauron/Thû surviving beyond the First Age is also an old one, entering in the Lay of Leithian (c. 1928; pre-Hobbit), particularly with the lines:
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.
Around the same time as The Hobbit was being written, but before it was published (and before LotR was begun), the earliest concepts of the Second Age, the Fall of Númenor, and the Last Alliance had also entered; see HoME 5 and the first version of The Fall of Númenor:
the peoples of Beleriand destroyed his dwellings, and drove him forth, and he fled to a dark forest, and hid himself
And the second version (also pre-LotR):
...Mordor the Black Country, where Sauron, that is in the Gnomish tongue named Thû, had rebuilt his fortresses...
This establishes beyond doubt that the concept of the Necromancer-as-Sauron had been intended from the start, but what had not yet arisen was the concept of the Rings of Power.
And so in the first edition of The Hobbit, the Ring itself is not a particularly powerful or dangerous item. It's just a simple "ring of invisibility", not much more, and in fact Gollum had even wagered it as his side of the riddle contest (and had shown Bilbo the way out instead, with much apologies, after he couldn't find it - because Bilbo, of course, had it in his nasty little pocketses).
The concept of the Rings of Power only entered during the writing of LotR, and even then took some time to emerge; initially the Ring was described as "not very dangerous" (HoME 6) but gradually grew to become what we know today. Towards the end of the writing of LotR Tolkien also rewrote the "Riddles in the Dark" chapter of The Hobbit, and submitted it to his publishers as a sample of a possible reworking to fit the new concepts (see Letters and HotH). However, as a result of misunderstandings, this was actually published in a second edition of The Hobbit in 1951 (after LotR was finished, but before it was published).
From here, Tolkien decided to keep both versions of "Riddles" but recast the first edition version as the story that Bilbo had originally told Gandalf and the Dwarves; the second edition version was the true story that Bilbo had originally kept hidden but which Gandalf eventually got out of him; see "Shadow of the Past" (and also Letters):
Then I heard Bilbo's strange story of how he had "won" it, and I could not believe it. When I at last got the truth out of him, I saw at once that he had been trying to put his claim to the ring beyond doubt.
So the whole story is a mixture of out-of-universe intentions and accidents having an effect on in-universe occurrances. In summary:
- Sauron/Thû/the Necromancer was always there from the beginning, and always intended to be the character he is.
- The Rings weren't; they entered later.
- The original concept of the Ring was as something quite benign.
- When the concept changed the older story was changed to suit the new concept.
- The older story was then retained as Bilbo's original false explanation.
In other words, and to put it more simply: "Bilbo lied".