Roman Pavlyuchenko came off the bench to score the decisive winner and keep alive Tottenham's chances of securing a place in the Europa League next season.
Pavlyuchenko has fallen out of favour in recent weeks, but he reminded Harry Redknapp of his ability when he stole all the headlines in this tense London derby.
The Russia international scored the only goal of the game on 65 minutes when he turned James Collins and fired the ball past Robert Green.
The victory moved Tottenham to within three points of West Ham who currently sit in seventh spot and rules out any chance of them being dragged into a relegation battle in the closing stages of the season.
Tottenham were looking to get back on the winning trail following their late defeat at Ewood Park and could have broken the deadlock after just two minutes.
Aaron Lennon beat Herita Ilunga on the edge of the box and fired a shot just over the bar.
Tottenham had strong claims for a penalty turned down on 20 minutes when Robbie Keane's cross appeared to strike the hand of James Tomkins, but referee Martin Atkinson waved for play to continue, much to the disgust of the home supporters.
The home side continued to dominate the proceedings and came close again on the half-hour mark when Tom Huddlestone struck a 25-yard shot which produced a fine save from Robert Green diving away to his right.
Green had to be at his best again just seconds later when he kept a low effort from Keane out.
Darren Bent came close to opening the scoring on 32 minutes. Benoit Assou-Ekotto's high ball into the box picked out the Tottenham striker who rose the highest and flashed a close-range effort inches past the post.
West Ham waited 34 minutes before creating their first strike on goal when David Di Michele's volley was kept out by Heurelho Gomes.
Redknapp was forced to make a change at half-time after Jermaine Jenas was forced to withdraw from the action and was replaced by Didier Zokora.
Zokora was lucky to stay on the pitch following a reckless challenge on Lucas Neill, but escaped with just a yellow card.
The game was crying out for a goal and it was West Ham that had a golden chance to take the lead on 58 minutes.
Jonathan Woodgate failed to deal with a long goal-kick from Green and Di Michele was clean through on goal but fired his shot straight at Gomes.
West Ham were made to pay as Tottenham finally broke the deadlock on 65 minutes. Luka Modric played the ball in to Pavlyuchenko who turned Collins and slid the ball past Green and into the corner of the net.
Lennon had a golden chance to wrap up the victory on 87 minutes when he was clean through but was denied by Green. The rebound fell to Keane who saw his shot cleared off the line by Collins.