Paul Stalteri and Michael Carrick struck either side of the interval to maintain Spurs' bid to qualify for Champions League football next season.
Keane joins the celebrations after Carrick's goal for Spurs
Stalteri opened the scoring in the 44th minute after Manchester City keeper David James saved from Robbie Keane.
And Carrick fired high past James four minutes after the break.
Tottenham were anxious after Georgios Samaras struck for City, but they deserved to win, with James producing a series of fine saves.
City, on the receiving end of a savage public attack from manager Stuart Pearce after the home defeat against Middlesbrough, created the first clear opening.
Trevor Sinclair's clever pass sent in Micah Richards, but the youngster dragged his shot wide.
City goalkeeper James almost gifted Spurs the lead in the 19th minute, when he sent a clearance straight to Mido, but he failed to find Keane, who was waiting unmarked in the penalty area.
And seconds later Keane should have put Spurs ahead after another moment of nightmare defending by Ben Thatcher, but his weak lob was straight at James.
Keane was Spurs' inspiration, and it took a magnificent save from James to deny him an opener seven minutes before the break when he turned a rising drive on to the bar.
But Keane was not to be denied, and he was instrumental as Spurs deservedly took the lead a minute before half-time.
He turned Republic of Ireland colleague Richard Dunne on the edge of the area, and when James could only push out his powerful drive, Stalteri was on hand to steer home the rebound.
Spurs doubled their advantage four minutes after the interval when Carrick ran on to Teemu Tainio's pass to shoot high past James.
But a moment of carelessness from the Spurs defence allowed City to grab a lifeline three minutes later.
Sylvain Distin's long throw was turned in by Samaras from close range to give City hope.
Keane quickly had the ball in the net with a smart finish, but the goal was ruled out for offside.
Samaras' goal gave City hope, and Spurs were suddenly living dangerously, with Lee Young-Pyo clearing off the line from Richards and substitute Albert Riera bringing a fine save out of Paul Robinson.
But James was having a busy afternoon, saving Anthony Gardner's low shot and then producing a stunning stop to turn Stalteri's deflected shot on to the post.
Tottenham boss Martin Jol:
"This is a great result and we deserved the win even though we did not make things easy for ourselves.
"If it was not for their keeper David James we could have scored five goals.
"The next game is against Everton and all our games are like finals but if we show the same commitment we have a good chance of getting the fourth spot."
Manchester City boss Stuart Pearce:
"We are in a poor run of five straight defeats.
"I'm disappointed with the result but they had a go for us and scrapped but we are missing the commodity of confidence.
"I was vocal in my condemnation of them last week but this time their effort was excellent.
"If we start the game at West Ham next week the way we finished this week we can go into the game with confidence."
Tottenham: Robinson, Stalteri, King, Gardner, Lee, Lennon (Defoe 82), Jenas, Carrick, Tainio (Davids 89), Keane, Mido.
Subs Not Used: Cerny, Murphy, Davenport.
Goals: Stalteri 44, Carrick 49.
Man City: James, Danny Mills (Riera 59), Dunne, Distin, Thatcher, Sinclair, Richards, Musampa, Reyna (Sibierski 79), Vassell, Samaras.
Subs Not Used: Weaver, Sommeil, Wright-Phillips.
Booked: Vassell, Richards, Thatcher.
Goals: Samaras 52.
Ref: D Gallagher (Oxfordshire).