While it might appear that the change from Gandalf the Grey to Gandalf the White in Lord of the Rings is little more than a costume change, the story goes a lot deeper than that. J.R.R.
Tolkien is known for his extensive lore and impermeable extended writings in The Similarilion, and between those writings and the original book, there is a lot more than can be understood about the change that Gandalf undergoes. After seeming to fall in battle to the Balrog during The Fellowship of the Ring,
. Read more on screenrant.com