Daniel Sturridge opened the scoring for the visitors in the first half before a second-half brace from Philippe Coutinho took the game beyond West Ham and left the Reds within touching distance of Champions League qualification.
Divock Origi added a fourth with less than 15 minutes remaining as Liverpool cruised to three vital points that lift them back up to third in the Premier League table ahead of next weekend's season-ending home game against relegated Middlesbrough.
Having seen both Manchester City and Arsenal win on Saturday, Liverpool arrived in East London knowing that only a win would be enough to keep the battle for a Champions League place in their own hands.
Jurgen Klopp welcomed Sturridge and Adam Lallana back into his side for the crucial contest, but the visitors could have been behind after less than seven minutes when Sam Byram dragged a shot past the far post having been found in space inside the area.
It was an entertaining and end-to-end start to the match, and Sturridge drew a routine stop from Adrian before Liverpool squandered their first really clear chance of the contest.
Joel Matip rose highest inside the box to meet Coutinho's corner, but his downward header bounced back up against the crossbar and neither Sturridge nor Dejan Lovren could turn the rebound home before West Ham smuggled it away.
Simon Mignolet was forced into his first piece of action shortly afterwards when he got down smartly to keep Edimilson Fernandes's low drive out before Adrian did well to hold a powerful first-time strike from Coutinho at the other end moments later.
Liverpool began to take a greater degree of control as the half progressed, but they struggled to break through the West Ham defence and could only muster speculative efforts from Coutinho and Sturridge before James Milner scuffed a better opportunity wide of the far post.
The breakthrough did finally arrive with 10 minutes remaining of the first half, though, as an incisive through-ball from Coutinho released Sturridge on goal, and the England international marked his first league start since January 2 with his first goal since the same date, taking the ball around Adrian before slotting it into the empty net.
Liverpool's main threat in the first half generally came from corners, and Matip came close again shortly before the break when his header rippled the top of the net on its way over.
The visitors were reminded how tenuous their position was with just one minute remaining in the first half when the ball dropped to Andre Ayew from a corner, but the West Ham striker somehow hit the post twice from point-blank range with a couple of the worst misses of the season.
Having been let off in remarkable fashion Liverpool began the second half intent on giving themselves a cushion, but Adrian made a hat-trick of saves within a minute as Origi, Lallana and Georginio Wijnaldum were all denied in quick succession by the West Ham keeper.
That second goal did arrive shortly before the hour mark, though, with Coutinho picking out the bottom corner from the edge of the box moments after Wijnaldum had rattled the crossbar with a stunning first-time volley from 25 yards.
Coutinho doubled his personal tally for the afternoon just five minutes later, although West Ham felt aggrieved after referee Neil Swarbrick waved away appeals for a penalty against Wijnaldum's handball moments earlier.
Liverpool wasted no time in taking advantage of the decision and just 21 seconds later they had the ball in the back of the net as Wijnaldum played in Coutinho, who kept his composure to beat James Collins inside the area before smashing his finish past the keeper.
That completely killed the game off as a contest and from then on it was a question of how many Liverpool would get, with Origi becoming the third player to hit the woodwork when his long-range strike clipped the top of the crossbar on its way over.
The fourth goal eventually arrived with just under 15 minutes remaining as Liverpool put the result beyond any doubt in scrappy fashion, with Origi applying the finishing touch after both Lallana and Wijnaldum had failed to convert from inside the area.
By that stage the Hammers looked as though they had given up in their final home game of the season, and Liverpool would have fancied more goals when Origi threatened twice in the space of a minute shortly afterwards.
There was almost a stunning consolation for the hosts late on when Robert Snodgrass fired a sweetly-struck first-time volley narrowly off target, but in the end Slaven Bilic's side were well beaten and could now require a five-goal swing on the final day of the season to stand any chance of finishing in the top half.
Liverpool, meanwhile, know that victory at home to relegated Middlesbrough would seal their place in the Champions League for only the second time in the last eight years having moved four points clear of fifth-placed Arsenal, who face Sunderland in their game in hand on Tuesday.
The win also sees Liverpool keep three consecutive clean sheets for the first time since August 2015 and win four away games on the bounce for the first time since April 2014, while the London Stadium is the 52nd different venue at which they have won in the Premier League era - extending their own record.