Following a rare Chelsea goal for Claude Makelele, Michael Dawson and Aaron Lennon scored for Spurs, leaving the title holders three points behind leaders Manchester United in the table.
Terry was sent off after receiving a second yellow card in the 71st minute and several Spurs players attempted to confront the defender before he left the field.
Trouble also flared between rival coaches Arsene Wenger and Alan Pardew as West Ham upset Arsenal 1-0 at Upton Park.
Marlon Harewood scored an 88th-minute winner for the Hammers to move out of the relegation zone.
“Before the game, we had a feeling it could be our day today and we deserved to win,” said Spurs captain Robbie Keane.
“We are desperate to climb the table, but to get a win over Chelsea is especially sweet.”
The Chelsea manager, Jose Mourinho, was unhappy with referee Graham Poll and suggested officials attend post-game news conferences to explain decisions.
“Instead of managers speaking against referees, I don’t know why they don’t speak here, have a press conference after the game instead of managers,” he said.
“I have a lot of complaints but the game is over, there is nothing to do.”
Harewood’s late goal for the Hammers led to Wenger and Pardew having to be separated by their assistants and the fourth official.
Wenger was furious that his team had a penalty claim rejected when Hammers defender Jonathan Spector looked to have brought down Alexander Hleb in the 67th minute.
Pardew’s celebrations led to an angry response from Wenger, who appeared to ignore Pardew’s offer to shake hands at the end of the game.
“I was celebrating the goal, that was all basically,” Pardew said.
“Arsene seemed to have a problem with that, probably rightly. It was frustration, there was nothing personal. Nothing was said. I apologise to him and to Arsenal.”
In Sunday’s other match Gareth Barry scored a penalty and Juan Pablo Angel added another as Aston Villa beat Blackburn at Villa Park.