.
Gandalf did not know how much power was really in him probably because he wasn't aloud to use it openly and to it's full extend. In essense
Sauron and Gandalf are the same type of being in origin, but I have a feeling that
Melkor fed into Sauron much more power than Gandalf said. But from a phrase in The Unfinished
Tales is seems to me that the
istari had extremely great powers. "Emmisaries they were from the Lords of the West, the
Valar, who still took counsel for the governance of
Middle-Earth, and when the shadow of Sauron began first to stir again took this meansof resisting him. For with the consent of
Eru they sent members of their own high order, but clad in the bodies of
Men, real and not feighned, but subject to the fears and pains and weariness of earth, able to hunger and thirst and be slain; though because of their noble
spirits they did not die, and aged only by the cares and labours of many long years."
That is what
Wizards are, but this next quote led me to beleive that infact that they do posess great power, but they are not alound to use it fully. "...and were messengers sent to contest the power or Sauron and to unite all those who had the will to resist him; but they were forbidden to match his power with power or to seek to dominate
Elves or Men by force or fear."
This indeed leads me to beleive that they could possibly even hold within that as great as Sauron but as you said he seemed to fear the
Witch King. Reffering back to what was said in the first quote they are subject to fears and pains. If the witch King's most feirce
weapon was fear than even on Gandalf would it have an effect when subjected to it. Lastly though Gandalf was so far above the Witch King that if he did not feel fear could have squashed him like a bug. I hope that helps to answer your question somewhat.