The visitors could have gone ahead in the opening minutes, but Luis Suarez's shot was saved by Paddy Kenny after the Uruguayan had turned Nedum Onuoha.
The QPR goal was bombarded soon after as Stephen Kelly just failed to get on the end of Martin Skrtl's header, while Dirk Kuyt then had a shot cleared off the line by Joey Barton.
The Reds made the breakthrough 10 minutes into the second half when Sebastien Coates fired an acrobatic volley into the net after the ball had broken to him from a corner.
After Stewart Downing had his shot saved by Kenny, the visitors doubled their lead when Kuyt marked his 200th Premier League appearance with a typically poached finish.
QPR began their comeback in the 77th minute when Shaun Derry headed in from a corner, and they grabbed an equaliser 10 minutes later when former Liverpool striker Djibril Cisse rose the highest to nod in Taye Taiwo's cross.
Their comeback was complete in the 90th minute as Jamie Mackie took advantage of some poor defending to calmly slot past Pepe Reina.