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 — Éowyn 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 had 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 Éowyn 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 Nazgûl 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.