Gandalf is first made aware of the Nine in June of T.A. 3018
While investigating some danger that Gandalf had forebode, he chanced upon a member of his Order Radagast. Radagast had journeyed for Rosgobel on the borders of Mirkwood to find Gandalf to provide him of information that the nine were abroad again.
At the end of June... I... journeyed along the Greenway; and not far from Bree I came upon a traveller sitting on a bank beside the road... It was Radagast the Brown....
"Gandalf!" he cried. "I was seeking you."....
"[What] do you want with me? It must be pressing. You were never a traveller, unless driven by great need."
"I have an urgent errand," he said. "My news is evil." Then he looked about him, as if the hedges might have ears. "Nazgûl," he whispered. "The Nine are abroad again. They have crossed the River secretly and are moving westward. They have taken the guise of riders in black."
The Fellowship of the Ring, Book 2, Chapter II, The Council of Elrond
While this doesn't conclusively provide evidence that Gandalf had not found this out in The Hobbit, all the details in "The Council of Elrond" about the White Council expelling Sauron from Dol Guldur make no mention of the Nine.
Some here will remember that many years ago I myself dared to pass the doors of the Necromancer in Dol Guldur ... and found thus that ... he was none other than Sauron... Some, too, will remember also that Saruman dissuaded us from open deeds against him...
ibid.
I ... persuaded the Council to attack Dol Guldur first, before he attacked Lórien. We did, and Sauron fled.
Unfinished Tales, Part 3, Chapter 3, The Quest of Erebor: Appendix
What remains unclear, however, is whether Gandalf had knowledge the Nazgûl had resurfaced but thought they remained in Minas Ithil (Minas Morgul), or whether he had no knowledge of their resurfacing at all. However, from the following extract of the Council of Elrond, Gandalf seems to suggest that they'd known the Nine had taken Minas Ithil and were residing there:
But we were too late, as Elrond foresaw. Sauron also had watched us, and had long prepared against our stroke, governing Mordor from afar through Minas Morgul, where his Nine servants dwelt, until all was ready. Then he gave way before us, but only feigned to flee, and soon after came to the Dark Tower and openly declared himself.
The Fellowship of the Ring, Book 2, Chapter II, The Council of Elrond