After a lengthy chat with Vivien still on Merlin's lap, playing with his beard, his wisdom overcomes his ardor, and he denounces her mentally for her trickery. She overhears the word 'harlot' on his breath and gives every impression of a noblewoman wrongfully accused. She calls on heaven to strike her with lightening if she has lied, and indeed, a bolt strikes a nearby oak tree. She flies into Merlin's arms begging him to save her, swearing her fealty. Merlin, half believing and weary gives in at last.
...And what should not have been had been,
For Merlin, overtalk'd and overworn,
Had yielded, told her all the charm, and slept.
Then in one moment, she put forth the charm
Of woven paces and of waving hands
And in that hollow he lay as one dead,
And lost to life and use and name and fame.
Then crying, "I have made his glory mine,"
And shrieking out, "O fool!" the harlot leapt
Adown the forest, and the thicket closed
Behind her, and the forest echo'd "fool."
Maybe I can't substitute Gandalf. He would never have fallen for it. At some point he would have said "Fool of a Took!" and thrown her down the nearest mineshaft. Besides, Merlin had a fatal weakness that Gandalf did not: he was human. Gandalf was something akin to an angel, or at least a principality.