Christian Benteke scored twice against his former club to give Crystal Palace a victory that boosts their hopes of avoiding relegation.
Liverpool started well and Philippe Coutinho put them ahead on 24 minutes with a curling free-kick.
Palace got back into the contest just before half-time when Benteke converted a Yohan Cabaye cross.
Liverpool piled on the pressure after the break but Palace claimed the winner, Benteke heading in after Jason Puncheon's flick from a corner.
Palace's third PL win at Anfield in a row lifts them to 12th, seven points off the bottom three.
Liverpool remain in third but are two and three points ahead of Manchester City and Manchester United respectively, who both have two matches in hand.
WHO'S GOING TO BE YOUR
MAN OF THE MATCH?
Vote at Full-time