Robbie Keane fired a dramatic late winner from the penalty spot to keep alive Tottenham's hopes of playing in Europe next season and increase the pressure on Manchester City boss Mark Hughes.
Tottenham's hopes of playing in the Europa League seemed to have disappeared after Valeri Bojinov cancelled out a first-half strike from Jermain Defoe.
But with just six minutes left on the clock, substitute Fraizer Campbell was brought down inside the box by Micah Richards and Keane made no mistake by striking the spot-kick past Shay Given.
The defeat ends City's hopes of finishing seventh and will fuel more speculation over the long-term future of Hughes, who has failed to deliver under the club's new Middle Eastern owners.
Tottenham remain two points behind Fulham in the table and will have to secure a victory against Liverpool in their final game and hope the Cottagers lose against Everton to qualify for Europe next season.
It was an extra special day for the north London club, who managed to set a new record after conceding just ten goals at home all season.
Tottenham dominated the opening exchanges and Defoe had two golden opportunities to fire his side into the lead.
Luka Modric's ball picked out Defoe after just two minutes and he fired the ball past Shay Given, but he was adjudged to be standing in an offside position and his effort was ruled out.
Defoe was involved in the heart of the action once again just 60 seconds later when he struck a low right-foot shot which produced a fine save from Given diving low to his left.
Given came to City's rescue once again on 14 minutes when he produced another good save to keep out Roman Pavlyuchenko's shot from the edge of the box.
The home side continued to create the best chance and Tom Huddlestone's corner picked out Ledley King on 18 minutes.
The big defender towered above the City defence but saw his close-range header superbly kept out by Given.
Tottenham got their just rewards when they opened the scoring in spectacular fashion on 29 minutes.
Huddlestone's cross picked out Defoe, who produced a sublime piece of skill when he back-heeled the ball past Given into the corner of the net for his first goal for the club since the end of January.
Defoe appeared to kick out at the fourth official, Trevor Massey, on the stroke of half-time following a clash on the sidelines which left him needing treatment and had to be replaced at half-time.
City boss Hughes was determined to get his side back into the game and made a double change on the hour mark when he brought on Benjani and Bojinov.
The move paid off as Bojinov grabbed an equaliser on 65 minutes.
Benjani flicked the ball into path of his strike partner, who smashed a close-range shot past Heurelho Gomes into the roof of the net.
Pavlyuchenko should have restored Tottenham's lead on 73 minutes. Alan Hutton's cross fell to the Russia international who was completely unmarked inside the box, but he dragged his shot wide of the post.
But it was Tottenham who snatched a dramatic late winner on 84 minutes after Richards brought down Campbell inside the box.
Referee Mark Halsey had no hesitation in pointing to the spot and Keane made no mistake firing the ball into the corner of the net.
City had time to blow a golden chance to snatch an equaliser on 89 minutes.
Nigel de Jong flicked the ball onto Benjani who was unmarked three-yards from goal, but he flashed his header over the bar.