Quote Originally Posted by Bohandas View Post
Gandalf had already been killed at least once prior to the fight with the balrog.

1.) Since he's secretly one of the ainur
2.) Silmarillion states that all of the ainur have the ability to shapeshift
3.) This power seems to be severely curtailed if an aimur has previously been killed
4.) Gandalf never seems to use this power even in situations where it could have both proved useful and not blown his cover
The Istari were given human bodies with human needs (like food and sleep) and even (albeit very slow) ageing. This is the likely reason they can no longer shapeshift.