West Ham United manager David Moyes called his side's comeback at Tottenham "one of the biggest wins I've had in football" as they continued their fine run of form.
Cristian Romero's early header had given Spurs a deserved opener in the 11th minute as the defender nodded in Pedro Porro's corner with a looping effort.
But Jarrod Bowen hit back for the Hammers, latching on to a loose ball in the penalty area and firing in a 52nd-minute equaliser.
And, after a poor backpass from Spurs defender Destiny Udogie, James Ward-Prowse side-footed an effort against the post before knocking in the rebound to complete West Ham's turnaround in the 74th minute.
"I think it is a huge win to come here and win against this side," Moyes told BBC Radio 5 Live.
"I'm pleased with how we were resilient and diligent in our work, organised, defensively structured and we were always a threat as well."
West Ham have won five of their past six fixtures across all competitions while Tottenham suffered their fourth defeat in five and have dropped points from a winning position for a fifth consecutive game.
Bowen epitomises tireless performance
West Ham are in a purple patch, but for much of the first half against their London rivals the Hammers barely had a touch as Tottenham seemed to dictate play at will.
Ghanaian Mohammed Kudus had a strike ruled out for offside and Lucas Paqueta sent a header narrowly wide as the visitors got a foothold just before the break.
Having absorbed Spurs' pressure West Ham were fortunate to level when Kudus' shot deflected off both Romero and Ben Davies and into the path of Bowen who dinked the ball over onrushing Spurs goalkeeper Guglielmo Vicario.
Twenty minutes later Bowen, again playing up front with regular number nine Michail Antonio recovering from a hamstring injury, forced Vicario to rush off his line to deal with Udogie's horror backpass.
The Italian pushed the ball straight to Ward-Prowse who duly netted West Ham's second after first striking the post.
"We were up against it tonight, we had to dig in and thankfully we just about scraped it," Moyes added on Amazon Prime.
"[It was a] huge performance because of the quality of the opposition. We are a team who can give some of the good teams a bloody nose, we have that in us."
West Ham were clinical when they needed to be with leading scorer Bowen epitomising his side's tireless performance.
They have won 10 points from losing positions in the Premier League this season - only Brighton (11) and Liverpool (15) have recovered more.
And the visitors' latest win means they remain ninth in the table and host Fulham in their next league match on Sunday.
Spurs drop points from winning positions again
Just over a month ago, Tottenham beat Crystal Palace to go five points clear at the top of the Premier League table with their eighth league victory in 10 matches.
Five games without a win have followed, Spurs' longest winless run since November 2019.
Having taken an early lead, Ange Postecoglou's side were seemingly cruising and almost had a second just before the break when Giovani Lo Celso's dangerous cross was deflected on to the woodwork by returning West Ham captain Kurt Zouma.
And in the 70th minute, with the scores level at 1-1, substitute Richarlison should have headed Spurs back in front, but glanced a Porro cross wide from close range.
Defeat means Tottenham have lost 16 points from winning positions in the Premier League this season, more than any other side.
They stayed fifth in the table, three points off Manchester City in fourth and face seventh-placed Newcastle in their next match on Sunday.
BDST: 1110 HRS, DEC 08, 2023