It may be explained (not explained away, mind you

) without leaving the plane of the story - Gandalf 1 (the Hobbit) is account of Gandalf as seen by Bilbo, who is light-hearted and 'childish' as compared to grave and serious Frodo, who's pen brought about account of Gandalf 2 (LoTR). Gandalf 3 (S77 ) is what some Númenorean and/or Elvish annalists thought of him. And so forth.
I wonder what Gandalf's
Autobiography would have had to say...