In the Characters' Past
In the Emerald City of Oz, Zelena watches Rumplestiltskin train Regina through the portal, as she plots her scheme to destroy her half-sister. Glinda then arrives to tell Zelena about her true destiny, and wants her to meet her real sisters, who then offer her a chance to become the Witch of the West after she is introduced. Glinda tells them that Zelena doesn't have to be wicked, but believes that she can be good, if she can put aside her vengeance against Regina. However, the sisters tell Zelena of a book that Glinda keeps that foretells the arrival of a person to Oz in a cyclone, and Zelena is led to believing that she was the one they were looking for. Glinda, on the behalf of her sisters, then give Zelena the light pendant that will harness and protect her as it grows her powers, but tells her that once it is removed she will be powerless. After she takes the pendant her green skin disappears. Moments later after Glinda shows her the land she is giving to Zelena, both Glinda and Zelena witness a green cyclone arriving and it reveals debris being left behind and along with it, a young girl from the outside world, who Zelena finds among the rubble. She tells them that her name is Dorothy Gale and when they ask her where she is from, Dorothy tells them she is from Kansas but wants to know where she is and their names. When Glinda suggests that they take Dorothy to meet the sisters, Zelena's jealousy starts to reemerge.
It appears that Dorothy has won over the other witches, except for Zelena, who now has become more envious of this latest visitor to their world (as evidenced by her green skin returning), and as she watches from the well, Glinda comes over to talk to her. However, Zelena, having read the book of prophecies, believes that Dorothy will replace her, saying that she is the greatest evil and a threat to Oz. Later on, Zelena surprises Dorothy at the well, where Zelena's green skin returns, making her evil as ever and vows to threaten Dorothy by creating a fireball that she will aim at her. This prompts a confused Dorothy to take a bucket of water from the well and throw it at her, causing Zelena to melt. Dorothy then runs and tells Glinda what had happened, but Glinda tells her that what she did to Zelena was the right thing to do; it turns out that Zelena was the evil threat all along. Glinda then offers Dorothy a chance to join the council of witches, but Dorothy turns her down and says she's sorry and wants to go home. Glinda tells her that the Wizard (who she believes has returned to his normal form) will return her to Kansas.
When they arrive to the Wizard's palace, Glinda and Dorothy arrive to see the unseen Wizard, who then grants Dorothy her wish by giving her a pair of silver slippers and disappears back to her world. However, after Dorothy disappears, Glinda discovers that the person that was behind the curtain was none other than Zelena, who was pretending to be the Wizard and survived the "melting" by reappearing after the incident. Now that she knows about her being the true threat and revealing her as the greatest evil, Zelena banishes Glinda to a pocket dimension within the northern region of the Enchanted Forest, where she can never tell the others. After she disappears, Zelena's pendant turns green, indicating Zelena's new power.
As David, Mary Margaret, Emma, and Henry arrive at the hospital for the delivery of the baby, Dr. Whale is there and ready to prep. Emma and Regina then put a protection spell around the hospital to keep Zelena away. Hook arrives to explain to Emma about why Zelena cursed him but when David interrupts the two by suggesting that Hook and Emma should go together to defeat Zelena, Emma is reluctant to have Hook tag along. At the same time, Gold, who is being watched by Zelena, is using his spinning wheel in his cage to create a pile of golden strands. Zelena then uses the strands to transform it into a golden brain that she'll use in her plans to create her time-travelling spell. They then put the items (Regina's heart, David's broken sword and the brain) in a circle. As Emma and Hook arrive to the farm to stop Zelena, she tells him that once this is over she and Henry are leaving Storybrooke but Hook thinks she is making a mistake, saying she is afraid. As Zelena and Gold approach the intruders, Zelena makes Emma choose between Hook and her magic, and uses her power to send Hook towards a well to make him drown. Emma then rescues Hook from the water and revives him with mouth-to-mouth, when suddenly a wave of magic is released from Emma, and with it Hook's curse. Hook is stunned that Emma would make a sacrifice of giving up her magic to save him, asking her, "What did you do?"
At the hospital, Mary Margaret finally gives birth to a baby boy, which comes just in time for Zelena and Gold to arrive and take the baby and wastes no time at all to take out anyone that stands in her way, including knocking Regina out after she tells Henry and Archie to hide. Zelena then freezes Mary Margaret and David and disappears with the newborn. Emma and Hook then arrive back to the hospital to explain what had happened to David. Emma soon discovers that Regina has the power of light magic to defeat her half-sister, and even Henry now believes that Regina can save the baby, since her kiss helped to break the curse, and because she still has some good in her. Back at the farm, Zelena places the baby at the edge of the circle and starts her spell, only to be interrupted by Emma, David, Hook, Robin Hood, and Regina, resulting in a battle. Zelena, believing that she has an advantage, tells Regina that only light magic can defeat her, but Regina's magic is as dark as they come. Regina, however, tells Zelena that she's wrong. Out of nowhere, Regina conjures up a source of light magic that knocks Zelena away from the dagger, allowing Regina to take away Zelena's pendant, rendering Zelena powerless. The loss of Zelena's powers results in her flying monkeys returning to human form, including Little John. Gold then tries to take Zelena with him because of everything she did to him, but Regina takes his dagger and prevents him from enacting revenge. Later on at the jail, Regina tries to reason with Zelena in an effort to redeem herself by saying that evil isn't born, it's made and so is being good, and leaves her with an offer to change her ways. Regina then takes the green pendant and places it in the vault. Over at the hospital, David returns the baby back to Mary Margaret's arms, but Emma tells Hook after he thanked her that her powers did not return after Zelena's powers were removed, saying she was glad they were removed so she can return to New York City with Henry. Emma then brought Henry over to watch David and Mary Margaret embrace the new baby with Hook watching on, disappointed over Emma's choice to leave Storybrooke.
Around the same time, Gold returns to the pawn shop and is embraced by Belle, who knew that he would return to her because of faith. Belle then gives Gold back his dagger because she believes in him, but on the condition that he promises not to use it to kill Zelena. As Gold takes the dagger, he gives it back to her because he loves her too much to make a risk. Gold then asks Belle to marry him, and she says yes. Unfortunately, it is later revealed that Gold still has not gotten over his vengeance against Zelena because it turns out that the dagger he gave Belle was a fake. Mr. Gold heads to Zelena's jail cell and tells her of his intent to kill her, despite her protests that she is now powerless. Gold then takes the dagger and kills her, which turns Zelena into a clay statue of herself that suddenly shatters into pieces. However, her clay fragments vaporize into a green cloud and vanish, and the amulet in the vault turns into a green cloud of smoke that escapes back to the barn, where it is used as the final ingredient to create the time portal.