Ragnar Klavan dived in to score his first league goal for Liverpool since he joined in July 2016.
The hosts looked to have earned a point when Johann Gudmundsson equalised with just three minutes of normal time remaining.
But Klavan headed home from almost on the goalline as the Reds snatched all three points.
Sadio Mane had given Liverpool the lead earlier in the second half with a superb shot from the edge of the area.
Victory moved the fourth-placed Reds level with Manchester United on 44 points, while Burnley stay in seventh.