I know you are only interested in the movies, but they provide no explanation. For those who come across this and are interested in what the books say:
The Witch King and Gandalf never came to clash directly during the battle of Minas Tirith.
They came close, facing each other, trading words and the Witch King taunts Gandalf - which is essentially the dialog used in the movie. But before they actually clash, they are interrupted by horns as the army of Rohan arrives, after which the Witch King retreats to face the new threat. So there is never a show of force by either party to reveal who is the most powerful - Eowyn kills the Witch King shortly after he faced Gandalf.
The scene where the Witch King easily dismisses Gandalf by breaking his staff effortlessly is entirely made-up by Peter Jackson and not canonical. Like every other 'Hollywood' scene Jackson made up entirely by himself, it is a quite random and pointless.
If they would come to a clash, Gandalf is a powerful Maia, who recently had his powers boosted further, wielding an ancient elven sword and a ring of power.
The prophecy of the Witch King foretold that he could be slain by no man. Being a Maia, Gandalf is not a 'man' (human), just like Merry was not a 'man' - which is the explanation Tolkien provides for Merry being able to stand up to the Witch King and assist Eowyn in slaying him.
So I think that if they were to fight, the odds would be heavily in Gandalf's favour.
Also in the books, Gandalf and Elrond together do defeat all of the Nine, including the Witch King, when they try to cross the river to Rivendell. Using their combined magic power, including two eleven rings of power used at once.
So just as Arwen wouldn't be able to defeat all of the Nazgul with a flick of the wrist, the Witch King wouldn't be able to defeat Gandalf with a flick of the wrist either. It's all made up by Peter Jackson.