Gandalf never actually comments directly on whether he is more powerful than Sauron or not; the closest he ever comes to it is to say (in discussing the potential dangers of Fangorn Forest):
Dangerous? And so am I, very dangerous: more dangerous than anything you will ever meet, unless you are brought alive before the seat of the Dark Lord ...
(The Two Towers, Book 3, Chapter 5, "The White Rider") which appears to imply that Gandalf (even as Gandalf the White) feels himself less powerful than Sauron.
This doesn't seem to be a big deal for Gandalf, though; we've seen him (as Gandalf the Grey) less powerful (or at least no more powerful) than the Balrog:
'Well, well! That's over!' said the wizard struggling to his feet. 'I have done all that I could. But I have met my match, and have nearly been destroyed. ... Then something came into the chamber. ... it perceived me and my spell.
'What it was I cannot guess, but I have never felt such a challenge. The counterspell was terrible. It nearly broke me.'
(The Fellowship of the Ring, Book 2, Chapter 5, "The Bridge of Khazad-dûm")
So it shouldn't be surprising that there were beings more powerful than Gandalf. But power was not what he wanted, or needed. The purpose of the Istari was
to contest the power of Sauron, if he should arise again, and to move Elves and Men and all living things of good will to valiant deeds.
(The Silmarillion, "Of The Rings Of Power And The Third Age")
In summary, then, Sauron was portrayed as stronger than Gandalf because he, like some other beings, apparently was indeed stronger, and Gandalf seems to have recognized that fact. It was not a big deal to him (though it may have been to Saruman), because that's not how Gandalf worked, and not how the Wizards were supposed to work.