My opinion is on the unpopular side here I'm a very visual-focused person and it's hard for me to get interested in a comic (or any visual medium, really) when the art turns me off.
Comics are a visual medium. If you can write a good story but don't have the ability to make it look presentable, it's better to write a novel. When I'm reading a comic, the art doesn't have to be amazing, but if it's bad or/and unreadable, it detracts from my enjoyment of it. If I really dislike the art style, I probably won't read it, either, no matter how amazing the story is supposed to be. Basically, the visuals have to at least appeal to me on some level.
As for comics with good art, where the story is struggling to catch up to the same level... Depends on how good the art is, honestly. If I love the art, I'll read it no matter how bad the story is, unless it's really something extremely terrible or/and offensive (and I mean, extremely). If the art is just okay, and the story is meh, I may or may not continue it, no hard rule here.
tl;dr... in terms of importance, for me art is ~70%, the story is ~30%.