Doubly subverted in Angel. Darla, his sire, wants to make sure that he is still soulless, so she leads him to a crib with a baby that she had kidnapped, and tells him to drink its blood (though not in so many words). Courtesy of Dramatic Irony, the audience knows Angel is ensouled. Angel then rescues the child.
In an aversion, a baby was killed by a disguised Cylon in the pilot for the new Battlestar Galactica. The scene ambiguous, with specific directions to the actress playing the Cylon to make it so. Was it just a murder, was it a mercy killing so the baby wouldn't have to go through the nuclear holocaust that would be released in a few hours, or was it an accident with the Cylon not realizing how fragile a human baby would be?
An aversion happened again in the second season opener, in which Commander Adama drowns a baby in Baltar's dream sequence on Kobol.
The onscreen death of Cami, the girl from botanical cruiser in the Miniseries is also a clear aversion.
And there are the offscreen deaths of 99% of all children in the Colonies. That's billions.
In The Plan, Cavil coldbloodedly stabs a small child who repeatedly tried to sneak in to his chapel and befriend him. What makes it so chilling is that the kid has been seeking refuge there for the length of the movie. In the end, Cavil seems to give in, sharing his food and learning that they both have the same first name. The whole scene is leading up to a Pet the Dog moment until he kills him and casually dumps his body to the side.
In Being Human, this trope is played with when a young boy who Mitchell befriended is hit by a car and critically injured. It is left for the mother to decide if he dies...or takes another way out. They play it straight and have Mitchell turn the boy into a vampire.
The plot of Season 4 revolves around a prophecy in which George and Nina's baby must die to save humanity from global vampire rule.
Boy Meets World: the sight of an empty hospital bassinet fails to evoke our fears that premature Joshua did not survive, thanks to this trope and the fact that it's a friggin TGIF sitcom. Sure enough, when we pan over, the baby is in mom's arms.
Charmed: Piper's unborn baby is impossible to kill due to the magical lineage of the baby; any fireballs or missiles that flew in Piper's direction were nullified by a glowing barrier orb around pregnant Piper. It is even hinted that the unborn fetus is consciously providing the magical protection. This protection lasts long after his birth. Many episodes featured the villain trying to grab the kid and getting blasted across the room. Although this takes a darker turn when they realize why the child would have gone evil in the future - trauma over someone capturing him and trying for weeks to figure out a way to kill him.
On an episode of CSI: Miami the team has been searching for a kidnapped baby. When Horatio finds the guy he tries to escape by driving away with the baby in the car. After a car chase through an airport the bad guy's car flips repeatedly and both he and the baby survive without serious injury until Horatio shoots the guy.
On the original CSI, the roller coaster "Pharaoh's Fever" was considerate enough of this trope to wait to fail until after a Mom with her kids had disembarked and an all-adult group of riders had gotten on board.
In the episode "The Runaway Bride", most of the Racnoss's laser beams whip around quickly — except for one heading towards a little girl, which moves sloooooowly enough for someone to grab her and run to safety.
Dead straight in "The Curse of the Black Spot", in which a child is vaporized by the villain... and the Doctor suddenly knows all's not what it seems. With no in-story reason to think this at all, the Doctor soon decides that the alien may only be moving people, not killing them, and he is soon proven right.
ER tried to pull something similar to the Boy Meets World example. When Abby and Luka's baby was born prematurely, a scene ended with the baby flatlining in surgery. The next scene indicated that several months had passed and featured staff members quietly discussing the couple's need for privacy. Cut to an empty crib. . .and pan to Abby holding her son. Another example, one of ER's most famous episodes, "Love's Labor Lost" comes very close to averting this when Dr. Green mishandles a routine birth, and up until the final moments of the episode, it seemed very likely that the baby would die, only for him to survive while his mother did not.
Also played straight when Sam's son Alex ran away. The final scene of the episode showed him hitchhiking and being picked up by a truck driver. But sure enough, by the next episode, he was found unharmed. With the exception of Carter's son, this has consistently applied to the children of the staff members—Greene's infant daughter survives her drug overdose, etc.
In Glue, Ruth's daughter Cassie almost dies twice thanks to her mom's negligence — but survives both times.
Egregiously played in the National Geographic documentary Guns, Germs, and Steel where a Boer family was attacked by the Zulus and we see the husband, wife, and the older son dead in the morning. However, the infant survived the attack and his cries can be heard.
In the Inspector Morse episode "Dead on Time", we are shown the death of a baby in flashback sequence. And through the series, several children are killed off at various times.
Elsewhere in the Tokusatsu genre, the earlier Kamen Rider series, which had far less problem offing random civilians in good-sized numbers to show how bad the Monster of the Week and his plan are than more recent series, have so many instances of death - in so many scary-despite-Special-Effects-Failure forms - instantly taking adults but only hovering menacingly in the direction of children (who are snatched out of the way by Riders) it's hard to pick the best. However, one time in Kamen Rider: Skyrider, a child infected by something that had disintegrated everyone else affected by it is not seen after the woman who'd been carrying her a second ago was kidnapped. By all rights that means she's dead, but we didn't see it.
Also, when young Ben is shot by Sayid, he survives...in a way that makes him "lose his innocence".
Also, it was kind of obvious that they were never going to kill Walt.
In the Animal Planet show Lost Tapes, anytime there's a child involved, they will be ensured to survive. Most egregious example is in the Thunderbird episode, where a boy with a broken leg is picked up by a massive raptor. The end narration says they found him the next morning with minor scrapes and bruises, meaning the giant bird of prey didn't so much as nibble the boy, and carried him in its talons with the utmost care.
While everyone else in the McNamara family in Nip/Tuck goes through hell and a half, the family's young daughter Annie never seems to have anything bad directly happen to her, at least in the early seasons. In fact, she is completely absent from roughly two thirds of all episodes.
In the series epilogue of Prison Break, Sara Trancredi is sent to prison and later physically assaulted by female correctional officers for her role in the Fox River break out. However, they gave her the courtesy of avoiding hitting anywhere that would cause harm to her unborn child.
Subverted in The Prisoner (2009). A character's toddler daughter rides her tricycle through a gate that has carelessly been left open, in the direction of a bottomless pit. She rides closer and closer to the chasm at full speed, until, at the last minute, she falls the fuck in, head-first, tricycle and all, on camera, never to be seen again.
In Japanese Spider-Man, in which adult characters are rarely spared from tragic deaths for the hero to angst over, one can always be sure that cute kids whose lives are in danger will always be spared. Moreover, one episode featured a heroic dog who was shot and fell hundreds of feet off a dam. Cut to tearjerker scene of the dog lying in the river... his owner calls and the dog struggles to his feet and limps over... and five minutes later, the dog is completely well again.
In an episode of Stargate SG-1, a young girl is the only survivor of a plague on her planet. It is later revealed that she was turned into a bomb in order to destroy the SGC. She doesn't actually blow up, though.
Star Trek: Voyager. Naomi Wildman. Sort of. See, on the day of her birth she is killed...and survives a horrible menace. At the same time. Yes, it is confusing. As usual, in horrible deaths, Harry Kim is part and parcel of it.
The ship is split into two identical Voyagers. The Harry and Naomi from one die, but the Harry and Naomi of the Voyager that eventually gets kaboom'd manage to survive and join the Voyager crew that lost theirs.
The dog variation is lampshaded by Dr Johnny Fever in an episode of WKRP in Cincinnati in which he says "It's like in the movies, ya know? You can waste the entire Confederate army, nobody cares - hundreds of thousands of guys deader than doornails! But kill one collie, everybody collapses in grief!"
This is combined with Black Comedy. Peepers threatens a woman by threatening to harm her baby. She agrees to what he says but he didn't think she would and accidentally threw the baby anyway. The baby stops crying and both are horrified but Peepers picks him up and says he's okay and the baby starts crying again.
Averted off-screen. There is apparently a list of Bellacourt babies who didn't make it to their first baby shower that's recited at the new baby's shower.