Christian Benteke coolly converted a penalty deep into stoppage time as Liverpool came from behind with 10 men to beat Crystal Palace 2-1 at Selhurst Park.
Palace were on course for a first Premier League triumph in 12 attempts - and their fourth in succession over Liverpool - when recalled midfield Joe Ledley fired in his first goal of the season in the 48th minute and James Milner left the visitors needlessly depleted when he collected a second booking after the hour.
Nevertheless, Jurgen Klopp's team retained attacking intent that was rewarded when Palace goalkeeper Alex McCarthy lost his footing while making a 72nd-minute clearance to leave Roberto Firmino to slot home his eighth Premier League goal of the season.
McCarthy, only playing because of an injury to regular number one Wayne Hennessey, saved twice from Benteke either side of Alberto Moreno striking the post as Liverpool made light of their numerical disadvantage.
But Alan Pardew's side are the only top-flight team without a league win in 2016 and their misery was compounded when Damien Delaney went to ground on Benteke in the fourth minute of added time.
The Belgium international, who has endured plenty of criticism during his debut Anfield season, made no mistake and sent McCarthy the wrong way to move Liverpool up to seventh in the table - six points shy of Manchester City in fourth, who they beat so convincingly in midweek.
An injury to in-form striker Connor Wickham meant a start for Emmanuel Adebayor in the Palace line-up, while Klopp bolstered his defence with the returning duo Mamadou Sakho and Moreno.
Adebayor led the charge for Palace in the opening stages, teeing up Yannick Bolasie for a smothered seventh-minute opportunity before drawing a near-post save from Simon Mignolet and heading Pape Souare's cross against the crossbar.
Some nervous handling by McCarthy from a Liverpool corner almost allowed Divock Origi - retaining his place in the attack despite Daniel Sturridge returning to the visitors' matchday squad - the chance to pounce.
Palace midfielder Yohan Cabaye clipped Wilfried Zaha's pass into the side netting from 25 yards, but the France midfielder was relieved to see Milner's 33rd-minute free-kick deflected over after he clumsily fouled Firmino.
The breakthrough came within three minutes of the restart, with Liverpool only partially clearing a Cabaye corner and allowed Ledley to crash home left footed from the edge of the area.
Firmino and Origi had shots blocked as Liverpool looked to respond, but, moments after Klopp made an attacking change by introducing playmaker Philippe Coutinho in place of Flanagan, his side's prospects suffered a further blow.
Milner had been booked for a robust first-half challenge on Cabaye and, having been dispossessed on the edge of the Palace box, he rashly brought down Zaha to leave referee Andre Marriner with a simple decision.
Scott Dann muscled in just in time as Origi waited to convert an Adam Lallana cutback in the 68th minute, but McCarthy did not cover himself in such glory four minutes later when Liverpool equalised.
The 26-year-old recovered some credit when he twice saved from Benteke, but, after Moreno rattled the upright, the Liverpool striker was allowed to have the final word with his first goal since December - Marriner having deliberated with his assistant before punishing Delaney to Pardew's dismay.
Key Opta stats:
- Palace have now gone 10 games without a clean sheet, conceding 2.3 goals per game on average.
- Milner was sent off in a Premier League game for only the second time in his career (versus WBA in Oct 2012).
- No Premier League side has scored more goals from corners this season than Crystal Palace (10) - level with Spurs.
- Ledley scored his first Premier League goal in 26 appearances. Indeed, two of Ledley's five PL goals for Palace have come against Liverpool.
- Benteke ended a run of 715 minutes in all competitions without a goal for Liverpool.