Controversial goals from Frank Lampard and Salomon Kalou, who struck in the last minute, kept alive Chelsea’s hopes of catching leaders Manchester United.
Sandro gave Tottenham the lead when he fired an unstoppable half-volley past Petr Cech from 25 yards on 19 minutes.
When Heurelho Gomes spilled Lampard’s 45th-minute shot he scrambled back and appeared to stop it from crossing the line, but the goal was given.
And Kalou looked offside as he bundled home Didier Drogba’s shot late on.
Carlo Ancelotti’s men will not care one bit about the manner of their goals as the win means they cut United’s Premier League lead to three points, with the leaders playing at Arsenal on Sunday.
Chelsea and United then come face to face at Old Trafford next weekend in a game that will go a long way to deciding the outcome of the title.
Click to play
Lucky win keeps title race alive – Ancelotti
For Tottenham the result is a devastating blow which all but ends their hopes of catching fourth-placed Manchester City and securing a second successive appearance in the Champions League.
The first half at Stamford Bridge was pulsating, with Chelsea showing their intent by pairing £50m striker Fernando Torres with Didier Drogba up front.
Tottenham, as ever, came to Stamford Bridge with their team set up to attack – Gareth Bale, Luka Modric, Rafael van der Vaart, Aaron Lennon and Roman Pavlyuchenko all started for the visitors.
Both sides had early chances, but it was Drogba who came closest to breaking the deadlock, with his powerful 30-yard free-kick superbly tipped onto the bar by Gomes.
The Brazilian was proving a thorn in Chelsea’s side and he also saved well from Lampard and Michael Essien in a frantic opening to the game.
But just as it looked like it was only a matter of time before the hosts opened the scoring, Tottenham took the lead in spectacular fashion with a goal out of nowhere.
Spurs midfielder Sandro opened his account for the club by finding the top right-hand corner of the net with a half-volley from 35 yards that screamed past Cech’s helpless dive.
Click to play
Ball did not cross line – Redknapp
Chelsea came roaring back as the game went from one end to the other and Lampard’s cross to Essien was tipped over the bar by Gomes before Torres attempted to head in from the resulting corner when he should have used his foot.
Tottenham looked threatening on the break and Branislav Ivanovic was booked for a crude challenge on the dangerous Bale, who was lively throughout.
Spurs seemed to be coping with everything that was thrown at them but Chelsea equalised in fortuitous circumstances just before half-time.
Not for the first time this season Gomes was to blame, with the Brazilian allowing Lampard’s 25-yard shot to squirt through his legs.
The keeper seemed to have scrambled back and stopped the ball from crossing the line, but the assistant referee awarded the goal when even replays proved inconclusive.
Tottenham’s players complained bitterly to referee Andre Marriner but their protests were in vain as the teams headed into the break level.
Gomes was called into action early in the second half as he palmed away Drogba’s drive, with the Tottenham keeper looking even more nervy than usual.
Chelsea dominated the early stages of the half but struggled to break down a resilient Spurs defence and on the hour Torres was replaced by Kalou, with the Blues switching to 4-3-3.
The Ivorian had a glorious chance to give Chelsea the lead but he fired over from close range after Gomes had palmed Drogba’s free-kick into his path.
Spurs called for Jermain Defoe from the bench and his introduction kicked them into life, with John Terry bringing down his England colleague on the edge of the area as he charged through on goal.
Chelsea appealed unsuccessfully for a penalty moments later after Younes Kaboul appeared to bring down Kalou, but replays showed the Spurs defender had in fact played the ball.
With time running out Chelsea became increasingly desperate and threw on Nicolas Anelka for Malouda, while Lampard went close with a trademark effort from 25 yards that just sailed past the upright.
It looked as though Tottenham were going to hold out for a point but the ball fell to Drogba in the box and although he mis-hit his shot across goal, it found Kalou at the back post and he bundled the ball home.
Replays showed that Tottenham were again unfortunate, with Kalou standing in an offside position, but the goal stood and Spurs left Stamford Bridge with nothing.