The entertaining contest at Elland Road saw its first goal when Trent Alexander-Arnold assisted Sadio Mane to score a simple tap-in after Illan Meslier had rushed out of goal.
It was a deserved goal for Liverpool, but Leeds were much improved after the break.
Patrick Bamford hit the crossbar before the Whites finally got their goal through Llorente.
The Spaniard rose majestically to meet Jack Harrison's inswinging corner and power a header past Alisson.
They remain in sixth, two points behind the Hammers with six games remaining.