For me, it often depends since a lot of cartoons that I've seen through the years have always strived for the former but had an amazing (or at least great) story tagged along. I think a story with good art can equally make a terrible story as much as a series with terrible art makes an amazing story. But even still, you can say the same the other way around where great art helps impact a great story, but terrible art will add to a terrible story. A series with bad, not-so-detailed, or less impactful art can create stories that are good to most (and sometimes not as good to others), just look at Adventure Time and the series that spun-off from it, as well as Over the Garden Wall. While I'm not a fan of the art for either show, they tell (from what I've heard from others) a good dark story.
Personally, I always felt something like Disney's Gargoyles, or even Ducktales (classic and new) told a good story as well as had good art (but that can be attributed to the fact that Disney poured effort into those TV creations, almost like they do their movies).
For the most part, the art you see is pretty subjective. Some will find it better than others, while others will want something more. Mostly, I don't mind, especially when its a one-off. Other times, you'll have to do me some good convincing if you want me to watch.