Always gameplay. That determines how much you enjoy the game. Some games don't need a story at all(1), a bad story rarely ruins your enjoyment of a game with good gameplay(2) and best story will not compensate bad gameplay(3).
As much as I appreciate good storytelling in all forms, that's not what games are about. When story goes ahead of gameplay, we get to visual novels and interactive books/movies, something bordering whether it is a game anymore.
(1) Carmageddon manual says something along the lines: "Story? You want a story? Go read a book."
(2) Larry 6 does leave a bad aftertaste despite best gameplay of the series; some vague endings in Japanese games (Phantasy Star 2) are somewhat frustrating as "well, what happened?"
(3) Mafia 1