On many Looney Tunes and Tex Avery cartoons, a silly little character will come out of nowhere as a Running Gag. Eventually, the villain would get fed up and ask him who he is. The response: "Why, don't you know? I'm the hero in this picture", followed by a Hyperspace Mallet to the head.
In all the cartoons Bugs Bunny and Elmer Fudd have been in together, there are three where Elmer wins.
Well what did you expect in an opera? A happy ending?
In the Porky Pig cartoon "The Case of the Stuttering Pig", the villain brags to the audience that there is nothing they can do to stop him. "Especially you!You in the third row! You big softie!" In the end, the villain is dispatched by a theater seat hurled into the screen...
Pigs: Who did that?
Villain: Who are you?
Guy: I'm the guy in the third row, ya big sour-puss!
The Looney Tunes short "Chow Hound" had a dog who kept bullying a cat and mouse in order to feed him meats, slapping the cat silly because he forgets the gravy. Soon after, he comes up with a scheme to get money and uses it to buy a meat market, which he eats whole. At the end, he's found at an animal hospital with a severe case of overeating. Enter the cat and mouse, who take gleeful vengeance at his predicament.
Cat: This time, we didn't forget the gravy.
Wallace & Gromit have a literal example in A Matter Of Loaf And Death, when Fluffles, the mistreated poodle belonging to the 'cereal killer', not only bites back but then proceeds to take the killer on with a fork lift truck (a reference to the end of Aliens).
Jonny Quest TOS episode "Dragons of Ashida" has an island ruled by a mad Yellow Peril scientist experimenting with genetically modified lizards and his Yellow Peril bodyguard, a hulking brute who is the only one able to train the savage beasts. Dr. Ashida bullies, abuses and slaps Sumi several times throughout the episode, until Sumi decides he's not going to take it any more, hoists his "master" off of his feet and throws him to the lizards, which kill and eat him. Unlike most examples of this trope, Sumi did not take advantage of Dr. Ashida's weakness, nor did he die while exacting revenge (though Fridge Logic suggests that when the authorities arrive, they drop down on Sumi's head as they would have originally done Ashida).
In an episode of Ben 10: Alien Force, Gwen tricks Charmcaster by summoning a mystical vortex that pulls her and her rock minions inside. One of the rock minions manages to hold on to a nearby pole with Charmcaster clinging on. But her one too many contemptuous insults results in an angry glare from the rock monster, who lets go of the pole, pulling it and Charmcaster into the portal as she screams in angry disbelief: "YOU DID THAT ON PURPOSE!"
In the Teen Titans episode "Aftershock Part II", Terra's last words to Slade, who had previously beaten and abused her, are: "You can't control me anymore!"
Spike, the dutiful mechanic of Atlas, turned on his master after having enough of his abuse. Unable to maintain himself, Atlas was soon defeated.
In the Batman: The Animated Series episode "Joker's Favor", one of The Joker's victims, a regular Joe Normal, apparently goes crazy and tries to blow both of them up with a bomb. His acting is so good that even Joker buys it and covers in fear behind Batman. And the best part? The bomb was fake.
The same trope ultimately causes the death of the Animated Series Joker. As revealed in Batman Beyond: Return of the Joker, the Joker kidnapped Tim Drake, the second Robin, and subjected him to torture and a steady stream of mind-altering drugs. He molded him into a "Joker Junior" in order to hurt Batman, and, after gaining the upper hand on the Dark Knight, tossed a lethal trick gun to Robin. Instead of shooting Batman, Robin turned the gun on the Joker and killed him.
He really did this two-fold. Batman is obviously not one of the Joker's underlings, but Batman did spend a series enduring the latter's verbal and physical assaults and crazy plots while maintaining as calm of a facade as he could. But when the Joker kidnapped and tortured Tim Drake, this sent Batman over the edge. Bruce would've likely had no qualms killing him if Drake hadn't done it first.
Harley Quinn also attempted to do this regarding the Joker twice: First was in the episode where he tried to destroy Gotham City with a nuclear device (since he was perfectly willing to abandon her and their friends among the other inmates, AND Harley's much beloved pet hyenas), downing the Joker's plane by shooting him in the head with her grappling hook, causing him to shoot the plane down himself. The second time was when she met Poison Ivy and attempted to kill The Joker for his earlier abuse towards her when it went too far. It's subverted twice: First, when she had the perfect opportunity to kill him when they meet again face to face, it turns out she was using a "Bang!" Flag Gun, and the second time, she ends up just forgiving him when he apologizes, to Poison Ivy's disgust.
Also, there was the time Joker, thanks to becoming rich, decided to replace Harley Quinn, rather than free her from Arkham. When he is arrested for trying to steal from Gotham mint to gain actual cash to pay his income tax (It Makes Sense in Context), Harley is disguised as the guard for Joker's paddywagon, and she dishes out her revenge by whacking him with her nightstick.
In Superman: The Animated Series, Superman ends up defeating Darkseid in his final battle, then bringing his battered body to his home planet and then telling the natives to "do as they please" with him. It's subverted, however, in that, despite Darkseid frequently abusing his followers, they end up picking him up and helping him to his castle, much to Superman's shock and horror; he tries to go after Darkseid but Supergirl talks him out of it.
The Justice League episode "Twilight (Of The Gods)" has Superman in response refusing to help Darkseid when Darkseid in turn needs the League to save Apokolips from Brainiac, thinking "If you're a God against a planet destroyer, save your own self, because I won't." And knowing Darkseid might be trying to sucker the League. Batman calls Superman on that, but what does Superman say at the end? "You know Bruce...you're not always right."
In W.I.T.C.H., Cedric gets tired of Phobos' manipulations and swallows him whole. Problem? Phobos had the power of two Hearts, thus Cedric gained a few extra powers, forcing the girls to fight him at the end.
"I was a fool to let you run the show/I'm cuttin' ya loose pal, look out below!"
A milder example than most occurs in Avatar: The Last Airbender , but it has far-reaching consequences and is set up interestingly; Mai's betrayal of Azula to save Zuko catches everyone by surprise, but what nobody sees coming is that Ty Lee takes out Azula with a paralyzing attack from behind and tries to escape with Mai before the guards catch them. This seems a surprising testament to Ty Lee's friendship with Mai, given how cheerfully Ty Lee seemed to go along with Azula's plans, but taken in the context of all the flashbacks of Azula belittling Ty Lee, being extremely jealous of her every success, and not thinking twice to put Ty Lee's life in jeopardy to get what she wants from her, the sudden betrayal may not so much be an impulsive decision to betray one friend to save another as Ty Lee finally overcoming the unholy terror she has of getting on Azula's bad side and attacking her both to save Mai and deliver retribution for what was probably years of abuse at Azula's hands. Ty Lee turning on her leaves Azula so incoherently furious she can't even speak properly for a moment, and shortly after this event, her mind snaps like a twig.
Zuko's entire role in the second half of third season is basically this, albeit indirectly.
In Young Justice, Sportsmaster aka Lawrence Crock was an abusive dad to his two daughters, Jade and Artemis, and gets a double dose of this in the episode "Usual Suspects." First Artemis fights him and with the help of her teammates traps him, and then Jade, who he'd had an uneasy alliance with, refuses to help him escape and leaves him to be captured.
In The Simpsons, when Homer has to take over Smithers' duties to Mr. Burns while Smithers goes on vacation, Homer was frequently met with a large amount of abuse by Mr. Burns. Eventually, Homer reached his breaking point and ended up punching Mr. Burns in the eye, initially fearing he killed Burns when he actually survived, but was also deeply traumatized by the event. Smithers chose Homer so Mr. Burns would want Smithers back, but it backfired.
In-universe, one Itchy & Scratchy show features Scratchy winning - but the kids missed it. D'oh.
Milhouse, a Butt Monkey at school and regularly taken advantage of by Bart, finally stood up to Bart and broke off the friendship with him, saying that he isn't going to be taken advantage of anymore. Bart thought Milhouse was just acting out until he sees that Milhouse was quite serious.
On a related note, thirteen episodes of Tom and Jerry had Jerry getting his comeuppance by Tom, almost always when Jerry dealt the first blow or took his retribution to far too vindictive levels.
In Recess, after Ms. Finster ends up injured from accidentally slipping on some candy (or so it would seem), virtually all of the kids on the playground took advantage of her current injury by ensuring that her running the playground would result in her experiencing a living hell as revenge for her strict policies. It's deconstructed in the ending.
In the episode "Christian Rock Hard" after Cartman suffers a Humiliation Conga due to his plan to show up Stan and Kyle failing, Butters, who like in most of his schemes is playing the role of his underling, then adds one more humiliation to top it off by farting Cartman's face and flipping him off.
Butters also gets back at Cartman and/or his relatives for their abuse of him, for ex. "AWESOM-O", "The Ungroundable" and "Cash for Gold".
And in the same episode, Cartman was constantly being racist and treating Token like crap. Token finally has enough and beats the crap out of him.
In "Poor and Stupid", the Vagisil CEO's wife gets in a race car and deliberately uses it to wreck the Vagisil car after he repeatedly humiliates her for her... feminine odors.
In the two-part season 3 premiere of My Little Pony: Friendship Is Magic, King Sombra enslaved the crystal ponies, and when he was defeated he cast a curse to make the empire vanish for a thousand years. After their return, the mere memory of Sombra brings pain to the crystal ponies, and they react with extreme fear when he returns. Then, after Spike retrieves the Crystal Heart, the crystal ponies, along with Princess Cadance (who incidentally has been losing energy trying to protect the empire from Sombra), unleash the power of the Crystal Heart, which destroys Sombra.
Baxter Stockman of Teenage Mutant Ninja Turtles fame is an often abused and mistreated lackey of the Shredder, and in both the 1987 cartoon ("Curse of the Evil Eye") and 2003 cartoon ("Return to New York") he's eventually attempted a nearly-successful coup to destroy both the Turtles and his master after reaching the breaking point. If anything, history will likely repeat itself in the 2012 cartoon.
Uprgor of The Dreamstone spends most of his service acting as Zordrak's grovelling punching bag. In "The Nightmare Stone" however, when Zordrak finally has him thrown out after his new trinket renders him redundant, he secretly sabotages his plan from inside and allows the heroes to steal it, making him essential once again.
A subtle example in "The Dream Beam Invasion", after Frizz and Nug manage to shrink into a Noop's dream and sabotage it, the outraged heroes follow them inside and more or less make an eye, arm and a legfor an eye. Partway through however, the Urpneys start to grow back, give the heroes a creepy Death Glare and sending them running away screamingin terror, making the one instance the Noops lost to them.
She-Ra: Princess of Power: In "A Loss For Words", Mantenna jumped at the opportunity to drop Hordak down the same trap door Hordak usually drops him down.
In the Captain Planet and the Planeteers two-parter "A Mine Is A Terrible Thing To Waste", Looten Plunder and Sly Sludge fire henchman Ooze and strand him in the desert. Ooze manages to walk back to civilization, suffering from heat-stroke and very angry. He testifies against Plunder and Sludge about their illegal dumping operation, getting them in a lot of trouble. Ooze clarified that he doesn't care about the environment, he just wanted revenge for what they did to him.