Are we talking "good" versus "evil", or "well constructed" versus "a poor excuse for a character"?
If good versus evil:
I am of the belief that neither of these concepts exist, in the most extreme definitions that are generally attributed to these words. Like Sirius Black once told Harry, the world isn't divided between good people and Death Eaters. There are always grey areas. If you watch Mad Men, Don Draper is a fantastic example of this. In Harry Potter, there's pretty much every character, ever. Lord Voldemort, even. JK Rowling provided him with a back story to give him depth-- because a real person is not a flat, evil person or a flat, good person. For this reason, she did the same with Dumbledore. Throughout the books, he's just this awesome, almost god-like character who does nothing wrong. Gradually, we come to see that he can mistakes, as well. In book 5, he ignores Harry, which turns out to have a catastrophic result. And in book 7, we learn about his past and how he blames himself for his sister's death.
If well constructed versus poor excuse for a character:
This sort of ties in with my previous answer. Real people are not entirely good, nor entirely evil, nor entirely intelligent, nor entirely loyal, nor entirely without their price, etc. Therefore, among other things, a well constructed character needs their strengths as well as weaknesses. Hermione was built to be a know-it-all who trusts nothing but facts and evidence. Luna was built to trust in faith. They each prove and disprove the other's beliefs. Luna and her father believe that the prized horn mounted on the wall of their home is that of the mythical crumple-horned snorckack. Hermione knows they don't exist and that it is, in fact, the explosive horn of an erumpant, and this is proved when it explodes and sets the house on fire. However, Hermione refuses to believe that a set of fairy tales could be true, that the deathly hallows can exist-- after all, it is the Lovegoods who trust they exist, and Xenophilius who wears the mark around his neck. But obviously, she is proved wrong, because they do exist.
Well constructed characters obviously need a lot of other things, as well, like a purpose to the story in general, something that drives them, people they love and people they hate, something that they feel defines them...
And to answer your question about what about a character ruins the story for me, I guess it has more to do with poor writing in general. But when you see it in the characters, I guess it's the writer's inability to construct a realistic character that turns me off of a story more than the character itself being unlikable. There should be a purpose to him/her being unlikable, and if the plot is interesting, I won't abandon it because of a character I'm probably supposed to dislike. If I'm not supposed to dislike him/her, like in the case of Bella Swan or maybe Sherlock in the BBC series (with the epically named Benedict Cumberbatch), then it will almost definitely turn me off of the story altogether. I've really tried to watch Sherlock... but I really can't get into it. Sherlock just annoys me.
I feel like this answer was a little all over the place... sorry about that :o