The Welsh winger struck twice, while Gylfi Sigurdsson also scored for Andre Villas-Boas' side who came back from 2-1 down to take the three points.
Bale put Spurs ahead before an Andy Carroll penalty and a Joe Cole strike put the home side ahead.
But Spurs ran out victors with Bale's superb 90th-minute strike – his 15th Premier League goal of the season – securing a win which sees them jump above Chelsea and into third.
The Welsh wizard said: "It was a massive victory. We knew after the Chelsea result yesterday that we had a massive chance to get third spot. We deserved the victory.
"We know what we are capable of. We have scored a lot of last- minute winners.
"We are confident that if we keep battling to the end we will score.
"I'm just enjoying my football. The most important thing is the team playing well. It is not about me."
Villas-Boas was full of praise for Bale after the game. He said: "He is an unbelievable, super talent. You have seen him this season go to another level."
Spurs are now five points behind Manchester City in second and seven clear of fifth-placed Arsenal, who they take on this weekend.
"We just have to keep getting points," Villas-Boas added. "We want to get the most we can get. Obviously the distance isn't big to second."
West ham boss Sam Allardyce said: "We have been beaten by Gareth Bale really.
"I thought the lads caused them a lot of problems."