Defoe struck 20 minutes from time - his first at the Stadium of Light since January 2 - to settle a five-goal thriller after first Wahbi Khazri and then Fabio Borini had cancelled out efforts from Diego Costa and Nemanja Matic with Blues skipper John Terry receiving his marching orders at the death for a second bookable offence.
The victory, which was just a third in 15 games for the Black Cats, saw them climb above derby rivals Newcastle, who could only draw at relegated Aston Villa, and means a home win over Everton on Wednesday evening will keep them up.
Norwich's home defeat by Manchester United in the early kick-off handed relegation rivals Sunderland and the Magpies the perfect incentive ahead of kick-off with Sam Allardyce's men knowing Wednesday's game in hand could prove key if they were to emerge from their clash with the Blues with something to show for their efforts.
They started brightly, but fell behind with 14 minutes gone, if in slightly unfortunate circumstances when Matic's return pass to Costa was unwittingly deflected into the striker's path by DeAndre Yedlin and the Spain international finished superbly from a tight angle.
Keeper Thibaut Courtois parried DeAndre Yedlin's 26th-minute header, but Costa might have doubled his tally two minutes later when he just failed to reach Branislav Ivanovic's driven cross in front of goal with the visitors enjoying a wealth of possession.
However, the Black Cats were up for the fight and dragged themselves back into it in spectacular fashion four minutes before the break when Khazri latched on to Gary Cahill's clearing header and smashed an unstoppable volley past Courtois with the help of a slight deflection.
But Chelsea hit back deep into injury time when Matic ran on to full-back Cesar Azpilicueta's header before sliding a shot underneath the advancing Vito Mannone.
The game could have been all but over had four minutes into the second half had Mannone not managed to block Costa's shot with his chest after Eden Hazard had played him in, but the home side continued to give as good as they got.
Allardyce was forced into a 55th-minute change when central defender Lamine Kone limped off to be replaced by John O'Shea, but it was Mannone who came to the rescue once again seven minutes later after Cesc Fabregas had picked out Costa in acres of space inside the penalty area.
Sunderland were enjoying arguably their best spell of the game and they made it count with 67 minutes gone when Patrick van Aanholt squared for Borini, who blasted a low shot past the unsighted despite Courtois getting a hand to it.
There was better to come for Allardyce's men three minutes later when John Obi Mikel failed to cut out Yedlin's cross and Defoe control before smashing the ball past the helpless Courtois, and it proved decisive as Chelsea's late flurry ultimately came to nothing and Terry, who had earlier been booked for a foul on Defoe, felled Khazri in stoppage time and was sent off.
Given Terry does not have a contract for next season, he could now have played his final game for Chelsea.
TWEET OF THE MATCH
"6 - John Terry has been sent off more times than any other Chelsea player in Premier League history (6). Sendoff." - John Terry enters the record books for the wrong reasons during their 3-2 defeat at Sunderland (@OptaJoe).
Vito Mannone: 7
DeAndre Yedlin: 7
Younes Kaboul: 6
Lamine Kone (O'Shea, 55 minutes): 6
Patrick van Aanholt: 7
Jan Kirchhoff (Watmore, 64 mins): 7
Lee Cattermole (Capt) (Larsson, 71 mins): 6
Yann M'Vila: 7
Wahbi Khazri: 7
Fabio Borini: 7
Jermain Defoe: 8
John O'Shea: 6
Duncan Watmore: 6
Sebastian Larsson: 6
Thibaut Courtois: 6
Branislav Ivanovic (Rahman, 69 mins): 6
John Terry (Capt): 5
Gary Cahill: 6
Cesar Azpilicueta: 6
Nemanja Matic: 7
John Obi Mikel (Traore, 83 mins): 6
Cesc Fabregas: 6
Willian (Oscar, 80 mins): 7
Eden Hazard: 7
Diego Costa: 7
Baba Rahman: 6
Bertrand Traore: 6
Jermain Defoe once again proved the man for the big occasion with a priceless winner on a day when it could have gone so badly wrong for Sunderland.
MOMENT OF THE MATCH
Given the implications, Defoe's strike was invaluable as he calmly controlled DeAndre Yedlin's deflected cross and blasted it past the helpless Thibaut Courtois.
VIEW FROM THE BENCH
Sam Allardyce will have been thrilled by both the way his side refused to bow to Chelsea's greater individual quality and their clinical finishing on a day when victory meant so much. By contrast, Guus Hiddink was left to bemoan his side's inability to hold onto the lead and some less than effective defending.
MOAN OF THE MATCH
The rest of the country may have been basking in a heatwave, but the Stadium of Light was shrouded in sea fret on a decidedly chilly Spring afternoon.
WHO'S UP NEXT?
Sunderland v Everton (Premier League, May 11)
Liverpool v Chelsea (Premier League, May 11)
Source: Independent Sport