Shelly "The Machine" Levene from Glengarry Glen Ross. While he did rob the office of the most lucrative leads, and is a self-admitted bit of a slimy salesman, he only stole the leads because he was down on his luck and had a sick daughter to try and support. His final plea to Williamson even brings her up.
Shylock from William Shakespeare's The Merchant of Venice is generally portrayed this way in modern productions, thanks to Values Dissonance. Debate has raged in modern times over how sympathetic Shakespeare actually intended Shylock to be. Although it's doubtful that Shakespeare had any qualms about writing a villainous Jewish character, Shylock has a clear motivation for his actions and articulately defends his point of view. Many Shakespeare villains, including the disinherited bastard Edmund in King Lear, have very legitimate grievances. You don't become the most influential author in the English language by writing flat characters.
King Creon in Sophocles's Antigone is so sympathetically portrayed that only the title tells us that the play's protagonist is his rebellious niece, Antigone.
Both Antigone and Creon are tragic heroes. The tragedy comes from the fact that both Creon and Antigone are right! Antigone is upholding one set of laws — divine laws about family and the proper treatment of the dead — and Creon is upholding a different set of equally valid ones — about the supremacy of the state.
Judas in Jesus Christ Superstar. He genuinely believes he is doing what is best for his people, is tortured by his decision throughout, and is eventually driven to suicide by guilt. And this is after Jesus ordered Judas to betray him.
The title character in Benjamin Britten's opera Peter Grimes — an outcast fisherman who handles his apprentices, who are mere children, roughly and, through his callousness, probably causes their deaths. But knowing that he is merely someone trying to survive, perhaps even prosper, in a hostile environment, that the town had organized a Torches and Pitchforks hunt against him, and that the children's deaths actually affect him greatly (he goes mad and commits suicide in the end), one cannot help but feel sad about him.
Boris Godunov, from Alexander Pushkin's play and Mussorgsky's opera. He murdered Dmitry Ivanovich, and attained the throne of Russia. However, he sincerely wishes to be a good ruler and is hounded by guilt. His aria, which he sings to his son before his death, is particularly heart-wrenching.
Verdi's Rigoletto. Rigoletto is mean-spirited and murderous, but he does everything for the sake of his daughter. Also, he arouses our underdog sympathies.
1776's John Dickenson seems like a haughty, self-interested sonuvabitch who wants to tank independence because it would hurt America's landed gentry. It turns out that he really does love America, but he still holds England in high regard and thinks a war would ruin the colonies. When independence is passed, he resigns from Congress to join the army.
The constable from Fiddler on the Roof attacks and later evicts the Jews of Anatevka. But while he does harbor some prejudice of the Jews, he doesn't desire to harm them, has a lot of respect for Teyve. He acts on orders from his anti-semetic superiors, and he knows if he didn't do it, they would get someone else. His face after launching the pogrom and watching the Jews leave Anatevka is full of sadness.
The Pillowman has Ariel, the bad cop that ruthlessly tortures and nearly kills both Michael and Katurian. By the end, it's revealed that the entire reason he's getting worked up is that he was abused as a child, and is returning all the pain that Katurian caused unto him. It culminates with the reveal that Ariel murdered his father over the abuse, just like Katurian to both of his parents, and Ariel begins to feel sympathy for the prisoner.
This is largely down to revisionism: Charles Dickens clearly saw Fagin as a monster who corrupted vulnerable children, arranged for the arrest and execution of his accomplices to avoid sharing his loot, and orchestrated the murder of Nancy after her Heel–Face Turn. Most adaptations, worried that this comes across as anti-semitic (possibly unintentionally, since reprints in Dickens' lifetime removed most of the references to Fagin being a Jew), portray him as someone forced into crime by being made a second-class citizen, or even a loveable rogue, and remove his more "evil" acts.