I think that the quintessential nature of good and evil are at issue here. Domination of others is the character of evil, in Tolkien’s expression of the world. In music of the Ainur before the making of the world Melkor imposes his desire for a greater part in the music upon those most amenable to his influence. He alters the nature of the music, and of the parts sung by others for his own satisfaction. He fails to create anything of his own but a few notes brayed upon loudly. But he establishes the power to lead those who he can, those who choose to follow him.
Sauron was the servant of Melkor, and sought to gain that same type of power, the power of dominion, and became very skilled in his own right. To say that Sauron was more powerful than Gandalf is to ignore the fact that Gandalf was utterly opposed to the use of that which Sauron considered power. Gandalf was only interested in assuring that some small thing lived beyond the current struggle that could be fair, and flower, and bear fruit in the future. The evil would be accomplished immediately if Gandalf took the ring. His spirit would be overcome by the desire for dominion over others, and the power of evil would have already won. Whatever minor benefit Gandalf might at first accomplish would be meaningless, if it came at the price of his abandonment of good. In the end, Gandalf has no ire against Sauruman, for all the evil that he had done, and hopes for his return to wisdom, and good. A vain hope, it turns out to be, but that is not a failing of Gandalf, rather a failing of evil itself.
And, by the way, Gandalf won. He won by encouraging others to resist the will of Sauron, and to resist the desire for power of their own. He breaks the dominion of Sauruman over Theoden, the influence of Sauron over the Stewards of Gondor. Eventually he breaks the influence of Sauron over the world, by encouraging the world to trust the simple goodness, and purity of heart of two hobbits. The power of evil is not greater than what Gandalf has, it is simply not of the same nature. Gandalf might well be better at domination of other minds, if he chose to attempt it. Sauron could not dominate him, even after three ages of practice at doing just that. The Balrog could not do it either. Killing Gandalf was the best they could hope for, and that turned out to be ineffective as well.
So, the problem for those who were good, when it came to the ring was that they must give up good itself in order to use the ring. Doing good with it was not possible, because the nature of the ring, one of dominion over others, was itself evil. You cannot compel freedom, or love. Attempting to do so is evil, at its beginning.
Tris