Victory means Liverpool equal the English league record of 18 successive wins, set via Manchester City from August to December 2017, with Jurgen Klopp’s side final dropping points in a 1-1 draw with Manchester United in October.
The Hammers – whose followers staged protests towards the club’s proprietors during – threatened to inflict Liverpool’s first league defeat this term when they led halfway through the second half.
Liverpool took an early lead when Fabianski failed to deal with a pursuits Gini Wijnaldum header but David Moyes’ side showed great character to hit back via Issa Diop’s header, which also have been saved out by Alisson.
And when substitute Pablo Fornals swept West Ham into the lead nine minutes after the damage Liverpool had been confronted with a fight to keep their unbeaten 27-match league run.
It had been a poor display by their sky-high standards however their luck was once in as Fabianski was once the offender again, inexplicably permitting Mo Salah’s shot to squirm through his legs in the 68th minute.
There was a sense of inevitability as Liverpool went for victory and so it proved as Sadio Mane turned in with 9 minutes left after Trent Alexander-Arnold lofted the ball over Fabianski.
It was cruel on West Ham and Moyes, with Liverpool keeper Alisson having to produce a imperative late block from substitute Jarrod Bowen.
Liverpool have restored their 22-point lead at the top and the Hammers are left in the bottom three.