gonna go full nerd here but it depends on whether its the physical, middle earth dwelling gandalf or the valinor dwelling, maiar named olorin. in crossing from valinor into middle earth it seems all the wizards lost a large degree of power. gandalf as a powerful leader and tactician against evil was much more talented than dumbledore, who managed to let voldemort rise to power, right under his nose, on two separate occasions.
gandalf was plucked from valinor, against his will (like bilbo), and required by the gods (the valar) to fight an enemy that would always be more powerful than himself, by the gods own intention. his assignment was to win without overpowering the enemy, and by cunning, diplomacy, inspiration and leadership he came out on top. way more badass than dumbledore in that way.
so in a duel, dumbledore wins every time except if the fight took place in valinor, then he wouldn't have a chance. but gandalf is still way more badass because of his wisdom.