I think the whole LOTR universe is simply more subtle than the Harry Potter or Forgotten Realms universes are.
The LOTR wizards are formidable, they're not people you mess with or get in the way of, they're powerful, they're smart, and they understand things in ways your normal person completely can't grasp. But LOTR wizards aren't just powerful, they're subtle. You see their work more as coordinators and planners and string-pullers in most cases. But you know they can throw down when they have to (ie: gandalf versus balrog). A LOTR wizard like Gandalf or Sauromon may have very few inexplicable powers though .... or very many that we just don't get to see. We don't know, because the system they live in is something we don't really know about (at least within the LOTR Trilogy+1).
Harry Potter wizards like to throw their magic around, a lot. They're constantly tossing out spells for things as simple as reading lights and making candles fly around and such, and are to the point that they depend on their magic as much as they depend on their shoes. Possibly moreso. The system they are subject to is pretty lax ... the rules consist of "here's a wand, here's some words, your imagination is the source of your magic's power" basically.
In forgotten realms, we have a much more well-defined system, which is built on the skill of the wizard and a set "commit these power-words to memory, pour them out (they'll erase themselves when you do) and you'll invoke this effect" -- it's pretty strict, and elminster is pretty much at the level of godhood as far as mages go. An ordinary archmage has a huge arsenal of magic he keeps fresh and at the ready, and has a lot of versatility, but elminster is the sort of guy who knows the system so well and in such depth and detail that he can basically break the rules at will by manipulating the fabric of the universe with raw force of will.
So what do we have? We have 3 very different systems, and people at the top of each of them. So how do we equalize it to make things generally fair? How about we remove the system, by removing their base magical power, and do a comparison then.
Without magic, Gandalf is an aged gentleman, but still extremely smart, extremely strategic, and a grandmaster-level fighter with both the sword and the staff. Elminster is an old guy, but has the whole "mystra's fire" and "mystra's chosen" thing going on still, and is also remarkably proficient with swords and daggers and various instruments, making him at very least formidable -- though he's probably not quite the guru that Gandalf is in that respect. Dumbledore on the other hand is pretty dang old, and not only have we (at least in the two movies I've seen) seen him do anything terribly impressive magically, but he's also been pretty absent in just about every significant combat situation, leaving the fate of the world and the lives of innocents in the trusty hands of barely-teenage novice spellcasters. We've never seen him swing a sword or a staff, we've never seen him walk in a particularly lively fashion, and really the only thing we know is that he's a clever old guy.
So let's review. Clever old guy who can beat down armies given a stick or a sword. Clever old guy who can escape from armies with his life given a stick or a sword (but not fight them off entirely), and given added protection in that when he gets stabbed, his wound closes and torches the stabber and anyone else in the vicinity. Clever old guy who likes making kids do things he's better suited to do, while he does very little.
I'm thinking on a level playing field I'd pick either gandalf over dumbledore.