There is no balance problem in fantasy literature because you have to look at how conflict is framed and how narrative is constructed. Ultimately, magic will do whatever the author needs it to do, so the real question is not how power is balanced, but rather what authors have needed magic to do.
The wizard of pre-modern fiction is often an archetype of otherworldly power and knowledge and is usually a religious figure too. His role is a mentor, guide, king-maker, and/or facilitator. The reason for this is that conflict and drama are heightened by human fallibility. When a wizard can solve anything at once then there is no story. Furthermore, when trying to reflect on the human condition, a person who is more human tells us more about ourselves than someone who can do things we could never do does.
So, to address these needs, the wizard is rarely the protagonist. Merlin has power, but only Arthur has the bloodline and destiny to unite the kingdom. The greek gods and their magical agents have power, but ultimately it is the mortals (or superhuman demigods) who reside in the world and are given the ability to shape it (which is a very interesting type of power-reversal), simply because they are defined as the protagonists and the gods are not.
You can also think about it from a Campbellian Hero's Journey direction to help clarify: It is the role of the hero to journey into the otherworld and return with a boon. The wizard plays the role of facilitating the journey or granting the boon because the wizard represents that otherworld's intrusion into the real world, rather than an agent of the real world. By this very role he plays he is excluded from being the hero.
So that has to do with roles, but there is also conflict framing. What is at stake and what are people struggling to overcome? When it comes down to this factor, power does not solve all problems. Frodo must carry the ring because of his humility and the ring's power of temptation. This is something Gandalf simply can not do. Similarly Aragorn is the lost king of Gondor, and not Gandalf. It is a role he can not play. All of his magical power can do nothing to replace those assets that the other characters have. He can only help them to achieve their respective destinies in his role as facilitator.
So, it's not a matter of who has the most power, but rather a matter of character motivation, role, and plot, that defines "balance" in fiction. In fiction what needs to be balanced is not the amount of kick-butt that each character has (which tends to be how people think of balance in D&D), but rather how important they are to the events in the plot and the ways in which each character overcomes his or her own personal challenges.