Both are important. And if one is weak, it can makes the whole game bad despite its qualities.
In games in which the story has little to no importance and which rely entirely in gameplay, it is not a problem, since you are playing the game for the gameplay, not the story.
In games in which the story is the main selling point or should be an interesting part of the game, if said story turns out to be badly-written, you may not want to continue playing, despite the gameplay being good (I'm looking at you Star Ocean 4). This is the unwritten rule of many (J)RPG: they must have a good story if they want you to continue playing.
On the other hand, you have games with an interesting story but less than stellar if not outright bad gameplay (Magna Carta was such a mess...). In that case, you will simply stop to "play" because the game becomes a chore, and you are honestly feeling like you are wasting your time playing something which is just not enjoyable.
So, I don't believe that Story > Gameplay, nor that Gameplay > Story. However, with games in which the story is not important in the first place, the Gameplay is far enough. Heck, in some case the Gameplay will be enough to make you continue playing a game with a poor plot (for games which are supposed to have a decent plot), but those are rare.
In short: Story = Gameplay, unless Story is not relevant in the first place, in that case Gameplay trumps all.