The Reds almost got off to the dream start as Trent Alexander-Arnold picked out Mohamed Salah, but the Egypt international's effort was too close to Lukasz Fabianski who denied him from putting Liverpool into the lead.
Alexander-Arnold enjoyed his best game of the season on the day as he continued to be involved in all of Liverpool's positive moves. Naby Keita found the right-back in space who drilled the ball into the danger area for Sadio Mane to apply the finishing touch for the opening goal.
West Ham were unlucky not to score as they threatened on the counter-attack, and they forced Jurgen Klopp's defence to be at their best to earn the cleansheet on the day. First Alexander-Arnold's heroics kept the score the same heading into the break from Pablo Fornals' chip over Alisson, while Andy Robertson and Keita combined to stop a glowing chance for Michail Antonio.
Salah was eventually replaced for Diogo Jota on a day where he didn't seem to have his shooting boots on, but the Reds were able to hold on despite a very respectable performance from David Moyes' side.
Winning titles is often about the games that are won by narrow margins, and Liverpool showed that they can do that, winning their fourth game of the season by a single goal.
The forward line could have got Liverpool into a more comfortable lead, and they have their defence to thank after a hardfought win.
Manager rating out of 10
Jurgen Klopp, 8 -- Klopp's system created plenty of opportunities and his timing of substitutions helped take the sting out of the game.
Player ratings (1-10; 10 = best, players introduced after 70 minutes get no rating)
GK Alisson, 8 -- Rarely looked flustered and made himself big when facing one on one situations. Commanded the area well.
DF Trent Alexander-Arnold, 9 -- Alexander-Arnold's best performance of the season. He could have had three assists on the night while his defensive display ensured three points, at one moment clearing the ball off the line from Pablo Fornals chip.
DF Ibrahima Konate, 7 -- The 22-year-old looked assured dealing with the threat of Michail Antonio who looked to challenge the France youth international with his pace.
DF Virgil van Dijk, 7 -- Defenders need to step up in these sorts of games and Virgil van Dijk did just that. A solid display from Liverpool's leading centre-back.
DF Andy Robertson, 8 -- The Scotland captain ran tirelessly and was often the man to force the winger into a mistake. Could have been picked out more by Liverpool's attacking players.
MF Jordan Henderson, 7 -- Overlapping runs down the flanks helped set up space for his teammates as the Liverpool captain linked moves together and passed with precision.
MF Fabinho, 7 -- Broke up the play on occasions and worked hard to get back into shape, though the Brazilian sometimes struggled to make an impact when West Ham broke with pace with direct balls in behind.
MF Naby Keita, 8 -- An all-round strong performance from Keita who impressed at both ends of the pitch. He created chances, rarely gave away the ball, and a vital intervention on Michail Antonio looked to have prevented a goal
FW Mohamed Salah, 5 -- A rare off day which saw him squander his chances while sometimes missing out teammates in space for a pass.
FW Sadio Mane, 7 -- Timed his run well and scored the decisive goal in the match, but Liverpool didn't get him on the ball as much as they could have in the second half.
FW Luis Diaz, 7 -- Looked a threat every time he had the ball, and that was no better exemplified than his run in the first half that saw him fouled on the edge of the box. Came close with an effort from range.
FW Diogo Jota, N/R -- Introduced in the 79th minute and showed astute managing of the game, taking a yellow card for his team to slow down the play.
MF James Milner, N/R -- On for Keita in the final minutes.
MF Curtis Jones, N/R -- Brought on in the 96th minute in place of Luis Diaz.