The thought just occurred to me that the two had co-existed for eons. Even not taking the music of the Ainur into account, wouldn't they have had ample opportunity to interact with each other on Arda in some way? Prior to Sauron's fall, wouldn't it have been productive for two of the most powerful Maiar to corporate?
On first glance, it seems surprising that they don't know each other, but there are three good reasons why they might not.
First, as was noted in the comments, we know nothing about the number of Ainur. In the first Music, they do sometimes sing together in small groups, but the Music is mostly a succession of solos. The Second and Third Musics are more choral. That's all we learn about their domestic arrangements during the era before the creation of Arda, and there's nothing in it that suggests that their existence involved much socializing. Had Olorin (the earliest name we have for Gandalf) and Sauron sung together, they might have known each other, but this apparently didn't happen.
After Arda was created
some abode still with Iluvatar beyond the confines of the World; but others, and among them many of the greatest and most fair, took the leave of Iluvatar and descended into it.
The most powerful of the Ainur were few, but nothing, really, is said about the number of lesser Ainur.
It's also worth remembering that Tolkien says that the Ainur were literally angels. Since he was well versed in Medieval studies, he knew that they believed that there were a very large number of angels, and most probably he did also. (The old bit about "How many angels can dance on the head of a pin" was not foolish at all, but actually was asking if the number of angels was finite or infinite.) There's every reason to believe that Tolkien may have imagined a lot of lesser Ainur in Arda.
In the Days of Bliss, Gandalf lived in Lorien
Wisest of the Maiar was Olorin. He too dwelt in Lorien, but his ways took him often to the house of Nienna, and of her he learned pity and patience.
while Sauron -- later Gorathaur the Cruel --
was of the Maiar of Aule, and he remained mighty in the lore of that people.
There is no reason at all to think that they encountered each other in their daily life.
So based on what we know of their early histories -- not much -- all we can say is that there is nothing that demands that they knew each other.
Answer #1: They simply may not have interacted much.
On to things more speculative!
First, while Tolkien is clear that the Ainur in Arda were powerful beings, he never shows them as being mentally of a different order than Elves or Men -- spiritually, yes, and of personal power, yes but, for instance, he never hints that they can contemplate the Cosmic All like Mentor of Arisia.
Yet it would take a very different mind than ours to remember with any clarity the entirety of a life outside of time followed by a timeless interval before the Years of the Trees followed by many, many thousands of years afterwards. (I can barely remember what I had for lunch yesterday!)
Even if Olorin met Sauron many times in gatherings, would he still remember him? And if his memory was clear enough that he did could he possibly be the sort of person that he was? Someone who remembers a hundred thousand years (some of them timeless if that makes sense) of experiences perfectly would be very, very alien to us. Gandalf was not, and so he probably didn't.
Answer #2: Even if they met many times, they almost certainly didn't remember it.
There's a third point, though, which applies to Olorin, though not necessarily to Sauron: The process of becoming one of the Istari almost certainly affected his memories of life before then.
We know that when the embodied Maiar Melian loved and married Thingol, she was bound to her embodied flesh and could not leave it and return to Valinor until Thingol's death. Something similar seems to have been true of the Istari, since they were clearly bound to their human bodies and could not leave them at will. And this doubtless affected their memories of the time before.
At one point he told people in Gondor that
Olórin I was in my youth in the West that is forgotten
While this could be taken to say that it is the West that is forgotten, we know that the Men of Gondor rise before meals to remember Numenor and the lands beyond, so it must be Olorin's youth that is forgotten.
Gandalf is saying that his memories of his life in Valinor are mostly or entirely forgotten.
Embodiment as an istari gave Gandalf a human-like memory if he did not already posses one. As the Fellowship stands before the Doors of Durin, he says of the markings on the stone:
'They are wrought of ithildin ... and sleeps until it is touched by one who speaks words now long forgotten in Middle-earth. It is long since I heard them, and I thought deeply before I could recall them to my mind.'
...if I am allowed a little peace from foolish questions, I will seek for the opening words. 'I once knew every spell in all the tongues of Elves or Men or Orcs that was ever used for such a purpose. I can still remember ten score of them without searching in my mind.
That could have been any of us. Gandalf's memory was human, not divine.
Later, after he dies in the fight with the Balrog and is resurrected and meets Aragorn, Gimli and Legolas, he says
'Gandalf,' the old man repeated, as if recalling from old memory a long disused word. 'Yes, that was the name. I was Gandalf.'
Answer #3: Even if Olorin the Maiar remembered meeting Sauron, Gandalf the Istari did not.