What If…? Episode 5 was based on a five-part comic-book series called Marvel Zombies. The Walking Dead creator Robert Kirkman wrote the issues. Like the comics, the episode is also set in an alternate reality where the superheroes are infected by a zombie virus that made them a part of the undead horde.
The episode took place after the events of Thor: Ragnarok. Furthermore, in this alternate reality, the events of this zombie apocalypse replaced the events of what could have been the Infinity War (like in the primary reality from the MCU).
Episode 5 of What If…? focused on the remaining members of the Avengers who survived the zombie apocalypse.
Here's a list of Easter eggs and theories from Episode 5 of Marvel's What If…?
Who survived the "What If...?" zombie apocalypse?
The Hulk/Bruce Banner:
Last seen fighting the zombified Scarlet Witch near the episode's climax, it is unclear if he prevailed in the combat or was bested by Wanda. However, it is a comic book movie/TV show rule at this point that the death of a character cannot be confirmed if it happened off-screen.
Winter Soldier/Bucky Barnes:
Bucky was thrown away by Wanda while fighting her. He likely survived the fall. However, it cannot be confirmed if he survived the horde of zombies.
Others:
Other surviving members include Spider-Man (Peter Parker), Scott Lang (only head), T'Challa, and Wakandans (except Okoye).
Furthermore, the characters who were not on Earth could have also survived. These include the roster of Guardians of the Galaxy, Thor, Captain Marvel, and more. However, this begs the question of Eternals' status as they are also confirmed on Earth during this period.
Wong's portal callback (from Infinity War):
The episode was based on Infinity War, where Wong used his portal to cut off Cull Obsidian's arm in the movie. In What If...? Episode 5, Wong ends up with a similar fate when the cloak of levitation manages to push Wong's head through the portal as it closes and chops off his head.
Quantum Virus:
Episode 5 of What If...? showcased a quantum virus that had infected Janet van Dyne while she was stuck in the Quantum Realm and turned her into a zombie. She spread the virus when she was rescued by her husband, Hank Pym.
The zombie apocalypse had a similar origin in comics when a superhero infected from the Infected Universe brought the virus back. This was explored in Ultimate Fantastic Four #21 (September 2005), when Zombie Mister Fantastic (Reed Richards) said,
"One superhero from an infected universe... That was all it took to end an entire world."
T'Challa:
What If…? Episode 5 established that T'Challa (voiced by the late Chadwick Boseman) was abducted by Vision, who amputated his leg to feed a zombified Scarlet Witch. In the comics, a similar fate happened to T'Challa when some of his limbs were amputated by a zombified Hank Pym who wanted them for sustenance.
Birds and Falcon:
The episode also showcased a moment when, during a fight at Grand Central Station, the remaining Avengers were attacked by zombified Hawkeye and Falcon. Sam Wilson (aka The Falcon) seemed to be able to control the birds to attack Happy Hogan.
This could be a reference to his powers in the comics, where he could communicate with birds.
Scott Lang's head:
In What If...? episode 5, Scott Lang was cured by the Vision from his zombified self. His body was used by Vision to feed zombie Wanda. In the Marvel Zombies Return #5 comic issues, a similar thing happened to Janet van Dyne, where she had her head bitten off by a zombified Hank Pym. T'Challa later escapes with Janet's head, and she lives on as a cybernetic head in the series.
Continuation of this episode:
Like Infinity War, What If...? episode 5 ended with a cliffhanger and showcased a zombie Thanos with the infinity gauntlet having five of the infinity stones. The last infinity stone, Vision's mind-stone, was in possession of Peter when the remaining heroes headed for Wakanda.
It is plausible that Marvel may revisit this story in the second season of What If…?.