Kolo Toure had gifted Fulham the opening goal of the game with a comical own goal before Daniel Sturridge netted for the seventh league game in a row to level just before the break.
Then a mistake from Martin Skrtel allowed Kieran Richardson to put the Cottagers ahead once more, but back came the visitors thanks to a fine individual goal from Philippe Coutinho.
As the match entered stoppage time Sascha Riether brought down Sturridge for a stone wall penalty which was duly dispatched by Gerrard.
The match was threatened earlier in the week by a proposed strike on the London Underground – and Brendan Rodgers’ six-match unbeaten league run looked in serious danger of ending on several occasions in west London.
Rene Meulensteen’s side produced a performance that belied their position at the bottom of the Premier League.
Few expected Fulham to suffer a ninth home loss of the season given the way they flew out of the blocks.
Lewis Holtby’s exquisite through ball put Richardson behind Martin Skrtel, with the former United man’s cross comically turned into an own goal by Toure.
It was quite the start by the Whites, for whom things came close to improving moments later as Holtby met a Darren Bent knock-back with a half-volley that flew inches wide.
Liverpool were struggling to quell Fulham’s intensity, but with Luis Suarez in attack it would not be long before Maarten Stekelenburg was called into action.
The Netherlands goalkeeper denied his former Ajax team-mate after impressively wriggling free to turn on target, before thwarting the Reds striker’s cheeky attempt at a lob.
Stekelenburg saved Steve Sidwell’s blushes after his woeful backpass almost put Suarez through on goal, with Sturridge and Coutinho wasting chances before Fulham regrouped.
Former Liverpool left-back John Arne Riise and Steve Sidwell saw shots blocked either side of a Bent headed as the hosts upped the ante, coming closest when Holtby played a neat one-two with William Kvist and continued to fire into the side-netting.
They were missed chances the home side were made to rue four minutes before half-time.
Getting back on his feet after slipping just inside the Liverpool half, Gerrard played a wonderful first-time ball with the outside of the right boot that split the Fulham defence open and found Sturridge to coolly slot home off the inside of the far post.
Uruguay international Suarez was soon back in action, first lashing across the face of goal before striking the post after turning his man on the edge of the 18-yard box.
It looked only a matter of time until there was a goal, but few expected it to come from Fulham.
A hopeful, if impressive, Sidwell shot from his own half was all the Whites had to show until the 63rd minute, when Liverpool gifted Fulham another lead.
Skrtel could not clear a Riether cross from the right, wiping out team-mate Jon Flanagan as the ball fell kindly for Richardson to bury from close range.
However, the lead was not to last as Coutinho showed impressive skill and poise to burst into space and strike, via a slight deflection of Heitinga, past Stekelenburg.
The Fulham goalkeeper was soon forced off after taking a bad knock in denying Suarez, with his replacement David Stockdale seeing Coutinho struck just wide before substitute Joao Teixeira fired over on his debut.
And, just as it looked like the west Londoners would take a deserved point, Riether was adjudged to have taken down Sturridge in the box.
Dowd pointed to the spot and Gerrard smashed home the spot-kick in front of the raucous visiting fans, who almost had another to celebrate when Teixeira struck over.