Gandalf is Istari, a god-like being in human form, naturally capable of wielding magic one of the few Superman's known weakness. Potentially speaking, if Gandalf were to trade blows physically with Superman, he could hurt him?
They're so far removed from each other that the comparison is basically useless. But if we're actually going to make it, I'm sorry to say that Superman would win. Though Gandalf is by far my favorite of the two characters, magic usually exists in much more subtle ways in the Tolkien universe (no, the movies don't count as reference points, they weren't signed off on by Tolkien and were somewhat sensationalized), so Superman's bull-in-a-china-shop approach would probably win out.
Gandalf doesn't use magic to beat an orc/human/gobin/octopus thing/uruk/wolves. Why should he use it against superman? This is a character which has only implied power. I don't know why he is usedin battle forums. Because if we consider him from what the guys show, he loses to green arrow. And from him being a minor God like being/part of world creators, he stomps anyone except high tier cosmic beings. Choose whichever.