In the film's climax, Peter discovers a hidden video message left by his late father, Richard Parker, inside an abandoned subway station lab. Richard reveals that he fled because Norman Osborn wanted to sell bio-weapons. Crucially, Richard altered the genetically modified spiders using his own personal DNA. This reveals why Peter was able to gain powers from the spider bite, but also means that transferring his blood to Harry Osborn would not cure Harry—it would cause a fatal genetic reaction.
Desperate and dying, Harry breaks Electro out of Ravencroft Institute. Together, they attack Oscorp. Harry uses the secret lab to inject himself with spider venom and wear an experimental suit, which mutates him into the hideous, unstable Green Goblin. Meanwhile, Electro shuts down New York’s power grid. Spider-Man and Gwen team up at a power plant; Gwen resets the power grid while Peter overloads Electro's body with electricity, causing him to explode.
Immediately following Electro's defeat, Harry arrives on a glider, sees Gwen with Spider-Man, and deduces Peter’s true identity. Realizing Peter denied him his blood, an enraged Harry grabs Gwen and drops her into a clock tower. A brutal battle ensues inside the clockwork gears. As the glass floor breaks, Gwen plummets. Peter incapacitates Harry and dives after her, shooting a web strand. The web catches her waist just inches above the floor, but her momentum snaps her neck upon impact, killing her instantly.
Devastated by grief and guilt, Peter quits being Spider-Man and spends five months visiting Gwen’s grave. Meanwhile, an imprisoned Harry instructs his associate to recruit villains from the Oscorp vault, springing Aleksei Sytsevich in a heavy mechanical Rhino armor to destroy Manhattan. Reminded of Gwen’s message after rewatching her graduation speech, Peter puts his costume back on and steps up to confront the Rhino, symbolizing his decision to embrace hope once again.