It depends completely and totally on what the game is for me. I'm willing to forgo pretty much nonexistent gameplay if the story is good enough. (Walking Dead) But in other instances like say, Devil May Cry, the story is obviously not as important as the gameplay and really, that's fine.
Personally though, if one or the other is entirely mishandled I just can't do it. Like for instance, Metal Gear Solid 2. The gameplay improves upon its predecessor in such an amazing way that just playing the game is great fun, but the story is just so...convoluted, messy, and terrible that I can barely stomach a single playthrough.
On the other side of things we have Dragon Age: Origins, this is more personal but I don't really know any games that have downright broken gameplay but great story so it'll have to suffice. The story in that is generally considered above average, but I consider the gameplay itself to be such a slog that I just don't find playing through it all enjoyable in the slightest.