Balotelli has struggled since his £16 million ($26 million, 20 million euros) pre-season move from AC Milan and on Tuesday he was on the bench until 11 minutes from time.
When the Italian striker was sent on by Reds boss Brendan Rodgers — a former Swansea manager — Liverpool were 1-0 behind after Marvin Emnes’s goal had broken the deadlock in the 65th minute.
It looked as if Swansea would hold on for victory until, four minutes from time, Balotelli demonstrated excellent movement to get clear of the visitors’ defence and guide the ball past Swans goalkeeper Gerhard Tremmel.
The match appeared destined for extra-time but, after Swansea’s Federico Fernandez was controversially sent off for a challenge on Philippe Coutinho, Liverpool’s Dejan Lovren scored in the fifth minute of stoppage-time when he got on the end of Coutinho’s free-kick to head home the winner.
Premier League leaders Chelsea survived a scare before seeing off fourth-tier Shrewsbury 2-1.
Jermaine Grandison’s own goal broke home side Shrewsbury’s hearts with nine minutes left when he turned in Willian’s cross.
Shrewsbury kept the game goalless for more than half the match until Didier Drogba finished from close range in the 48th minute for his third goal in as many matches and in three different competitions.
But Shrewsbury refused to be daunted and substitute Andy Mangan equalised just 84 seconds after coming on in the 75th minute before Grandison’s unlucky intervention decided the match.
However, Chelsea’s top-flight rivals West Bromwich Albion were knocked out by in-form Championship side Bournemouth, losing 2-1.
Bournemouth, fresh from their 8-0 thrashing of Birmingham, made 10 changes.
But that didn’t stop the hosts reaching the last eight of the League Cup for the first time in the south coast side’s history.
Eunan O’Kane gave the Cherries a 49th-minute lead and, after Georgios Samaras’s shot deflected in off Tommy Elphick in the 85th-minute, Bournemouth scored the winner barely 60 seconds later when substitute Callum Wilson raced down the other end to score the decisive goal.
The all-Championship tie saw second-tier leaders Derby County come from two goals behind to beat Fulham 5-2 at Craven Cottage.
Moussa Dembele’s first Fulham goals fired the London club into a 2-0 lead shortly before half-time.
But Chris Martin pulled one back from the penalty-spot before the interval for Derby and the Rams stormed to victory after the break thanks to goals from Johnny Russell, Jeff Hendrick and two from Simon Dawkins.
Meanwhile Sheffield United needed two goals in the final four minutes from Michael Higdon to beat fellow third-tier club Milton Keynes Dons 2-1- AFP