The Senegal international, playing his final game before heading off on African Nations Cup duty, looked to have won the game 18 minutes from time after Defoe had cancelled out Daniel Sturridge's opener from the spot.
However, his handball with five minutes left handed Defoe the opportunity to score his 11th goal of the season, and he obliged nervelessly to secure a 2-2 draw at the Stadium of Light.
The contrast between the form of the two sides could hardly have been more different ahead of kick-off, with Sunderland abject in defeat at Burnley on Boxing Day and Liverpool looking to maintain the pressure on leaders Chelsea.
Goalkeeper Vito Mannone was in fine form during a tight first half, turning away two efforts from Sturridge either side of a flying save from Georginio Wijnaldum inside the opening 18 minutes.
But opposite number Simon Mignolet was almost as busy against his former employers, fielding early efforts from Defoe and Jack Rodwell in an end-to-end start to the game.
The manner of Liverpool's opener jarred with the quality of the early attacking play on Wearside.
Defender Dejan Lovren scuffed his attempted volley from a James Milner corner harmlessly into the ground but saw the ball rear up off the turf for Sturridge to head past the helpless Mannone from close range
If the home fans among a crowd of 46,494 feared the worst at that point, they were to be pleasantly surprised within five minutes when defender Ragnar Klavan clumsily upended midfielder Didier Ndong as he burst into the penalty area and Defoe slammed the resulting penalty into the bottom corner.
The England striker's first goal of 2017 should really have been followed almost immediately by his second after he ran on to Adnan Januzaj's through-ball but could not go round Mignolet with Fabio Borini firing wide from the rebound.
Sturridge tested Mannone once again from distance as the break approached, but the Italian stood firm to keep his side in it.
The home side were convinced they should have been awarded a second penalty when Emre Can appeared to block Januzaj's 58th-minute cross with his arm, although at very close quarters, although referee Anthony Taylor was not.
The game was becoming increasingly stretched as the Black Cats sensed an opportunity, although that allowed the visitors to hit them on the break and Mannone needed to be at his best to keep out Sturridge's 71st-minute shot after he had run on to Adam Lallana's back-heel.
The Reds regained the lead from the resulting corner when Papy Djilobodji could only help on Alberto Moreno's corner to Mane, who tapped into the empty net, although his joy was short-lived when he conceded the game's second penalty by blocking Sebastian Larsson's free-kick with his arm.
Defoe's spot-kick was brutally emphatic to hand Sunderland a deserved share of the spoils.
Source : PA