Ideally both. But gameplay is the essence of ... the game. If that doesn’t work, all the pretty things mean nothing.
I am guilty of judging a game by what it looks like and if I don’t like the aesthetics, I’m usually not interested. Graphics mean a lot to me.
Often times though I’ve gone back to playing old Atari games or interactive fiction such as Zork. These are games with minimal to no graphics but can be just as engaging as any stunning, graphically demanding game.
A pretty girl in a pretty dress doesn’t automatically make the girl an interesting person. If she turns out to be a complete nut case, I’d stay well away from her. :D
Like I said once in another thread, It’s like many blockbuster movies. If the story doesn’t work and the characters are shallow or stereotypical, I don’t give a flute about how well the film looks, because I don’t care about the story. In those cases the looks are only there to cover up the lack of good storytelling.
If the essence of a story can be captured and still work perfect without all the fancy CGI, it’s just a good story and it should work well in any genre, in any form.
Same with games. One can’t hide the lack of gameplay behind beautiful graphics. Obviously this depends on personal preference, but in most cases folks will lose interest and the game won’t last long.