Gandalf is a terrible example of a mage, 99% of the magic he uses comes from magic items, and even then he just plain doesn't use much(also he doesn't learn and cast spells like a mage). Gandalf is a god in fact.

What a mage is varies tremendously depending on setting/system. In almost all cases they can do things other players cannot in exchange for something(xp, health, danger, ect).

I've come to see magic in an RPG as a kind of way to steal the title of GM for a period. Magic Users are less powerful than normal characters normally, but a limited amount of the time they can do something amazing and special and redefines the course of events, they say something and it happens(within the bounds of their abilities of course).