Luis Suarez and Jon Flanagan won penalties either side of a controversial Guy Demel equaliser to keep the pressure on Manchester City and Chelsea in the title race
Referee Anthony Taylor found himself at the centre of the action at Upton Park from the moment he penalised James Tomkins for handball late in the first half, allowing Gerrard to notch his first goal two minutes before the break.
|GERRARD HOLDS NERVE TO KEEP TITLE DREAM ALIVE|
Carroll headed against the crossbar after the hour before West Ham's Adrian became the second goalkeeper to fall foul of Taylor, who adjudged him to have impeded Jon Flanagan for Gerrard's second penalty in the 71st minute.
Luis Suarez curled a first-time effort against the frame of the goal late on, but Liverpool had already done enough to maintain their quest for the Premier League crown.
Brendan Rodgers' side return to the top of the table, two points above Chelsea and four ahead of Manchester City - who have played two games less and head to Anfield for what looks set to be a season-defining encounter in seven days' time.
Napoli loanee Pablo Armero made his full debut for West Ham after left-back George McCartney suffered a hamstring strain in Monday's 2-1 win at Sunderland.
A knee injury suffered in training by Daniel Agger meant a change for Liverpool at centre-back - Mamadou Sakho starting for the first time since they last lost in the league, at Chelsea on December 29.
Suarez had been the central figure in the subsequent 11 wins and two league draws, and the forward glanced the top of the netting with an early free kick.
|13/8||Liverpool are 13/8 with William Hill to win the Premier League this season|
Daniel Sturridge then twice blasted over but the contest remained disjointed until an explosive end to the half
In the 43rd minute, Gerrard, whose raking ball was collected by Suarez to draw a handball from Tomkins, coolly converted from the spot.
But West Ham found an instant response in controversial circumstances as Liverpool goalkeeper Mignolet - struck by a flailing arm under pressure from Carroll - dropped Mark Noble's corner for Demel to prod home.
Amid understandable protests from the visitors, referee Taylor signalled for the goal, and he did so again following lengthy consultation with his assistant.
Carroll again made a nuisance of himself on set-pieces early in the second period as Liverpool, who began the half with Lucas Leiva on in place of playmaker Philippe Coutinho, found clear chances at a premium.
There were no question marks when Carroll got the better of Mignolet in the 62nd minute, only to see his powerful header from Mohamed Diame's cross cannon back of the crossbar.
But Taylor once again placed himself at the centre of the action soon afterwards, awarding Liverpool a second penalty despite Adrian appearing to get a touch on the ball before bringing down rampaging full-back Flanagan.
Gerrard made no mistake from the spot again before Suarez was denied by both the crossbar and Adrian, as Liverpool closed out the kind of gritty win upon which title triumphs are often built.