Ruben Loftus-Cheek headed home in stoppage time as Chelsea escaped South Wales with a controversial 2-1 win over Cardiff.
Loftus-Cheek, on as a second-half substitute, steered his header into the corner of the net from Willian's cross (90+1) to seal Chelsea's comeback after Cesar Azpilicueta's header from an offside position had cancelled out Victor Camarasa's fine opener.
Cardiff, who also saw two good penalty shouts turned down, had looked set for a precious three points in their fight against relegation when Camarasa clipped a fine first-time effort past Kepa Arrizabalaga on 46 minutes, prompting boos and jeers from the visiting fans towards Maurizio Sarri.
Cardiff Etheridge (6), Peltier (6), Morrison (8), Manga (7), Bennett (7), Arter (7), Gunnarsson (7), Camarasa (8), Murphy (7), Hoilett (6), Niasse (6)
Subs: Mendez-Laing (N/A), Zohore (N/A), Ralls (N/A)
Chelsea: Arrizabalaga (6), Azpilicueta (6), Rudiger (6), Luiz (6), Alonso (6), Jorginho (5), Barkley (6), Kovacic (6), Pedro (6), Higuain (5), Willian (6)
Subs: Hazard (7), Loftus-Cheek (8) Giroud (N/A)
Man of the match: Sean Morrison
But Azpilicueta, two yards offside when Marcos Alonso flicked the ball into his path, levelled on 84 minutes and after Antonio Rudiger was fortunate to escape a red card for hauling down Kenneth Zohore, it was left to Loftus-Cheek to leave Cardiff boss Neil Warnock fuming on the touchline.
The result lifts Chelsea to within a point of the top four, with Cardiff five points adrift of safety, albeit with a game in hand on Burnley.
A tepid first half saw Chelsea dominate possession but fail to muster a shot on target, with Josh Murphy creating the best chance of the opening 45 when he bent a shot just wide from the angle after working some space in the box.
Meanwhile, Sean Morrison should have won a penalty for the hosts when his shirt was tugged by Alonso, with Pedro's fizzed effort over the bar on 10 minutes the closest Chelsea came to threatening Neil Etheridge's goal.
But the game sparked to life straight after the break when Chelsea failed to properly clear a set-piece and Harry Arter's low ball into the box was met by Camarasa, leaving Kepa with no chance.
Sarri's response was immediate as he threw on Eden Hazard, who started the game on the bench, and the Belgian drew a yellow card from Arter before Morrison should have had a second spot-kick - Rudiger this time hauling him to the ground.
At the other end, Morrison was putting in a heroic shift, blocking Pedro's shot before intercepting Hazard's dangerous ball across the six-yard box.
Willian then flashed an effort across the face of goal, but with Cardiff looking solid in defence, they were undone by Azpilicueta's offside header.
Zohore was then set free only to be hauled down by Rudiger, but with the home fans and players baying for a red card, referee Craig Pawson produced a yellow, sending Warnock apoplectic.
And his mood would only worsen, as Loftus-Cheek's late intervention left him staring down the officials as they left the pitch to a chorus of boos.
- Cardiff City are only the third team in Premier League history to lose four consecutive matches against a particular opponent despite opening the scoring each time, after Leeds United v Newcastle (Jan 2002) and West Ham v Arsenal (Apr 2014).
- Chelsea have now scored 18 goals in the final 15 minutes of Premier League matches this season, no club in the competition has managed more (also Liverpool).
- Six of the eight Premier League points Chelsea have won from losing positions this season have come home and away versus Cardiff.
- Chelsea's Ruben Loftus-Cheek's winner was his fourth Premier League goal of the season on his 17th appearance; one more than he managed in his previous 46 matches in the competition (3).
- Ruben Loftus Cheek's goal for Chelsea was their first 90th-minute winner in the Premier League since Frank Lampard scored against Everton back in February 2014.
- Cesar Azpilicueta is the 14th different player to score for Chelsea in the Premier League this season - only Man Utd (15) have had more different scorers in 2018-19.
Neil Warnock: "To get let down by the officials - roll on VAR. I might be too old by the time we get VAR, but that's why we need it.
"The offside [for Azpilicueta's goal] is not even close. We've worked three weeks for this, and we get let down by decisions.
"We felt that [Sean] Morrison could've easily had a penalty."
Maurizio Sarri: "We did not play very well in the first half. In the second half as usual. We conceded a stupid goal but today we reacted better.
"We were lucky for timing but in the end I think we deserved to win."
Man of the Match - Sean Morrison
It might seem odd to have a defender from the losing side as man of the match, but Morrison was superb. He should have had a penalty in each half, was heroic in his defending after Cardiff took the lead, and was helpless for Chelsea's equaliser given Azpilacueta was two yards offside. He made a game-high nine clearances and his threat at the other end was obvious, given the rough treatment he was given by the Chelsea defenders.
Cardiff visit Manchester City on Wednesday night - live on Sky Sports Premier League. Chelsea, meanwhile, host FA Cup semi-finalists Brighton on the same evening.