The Hammers raced into a two goal lead after Xabi Alonso lost the ball to Dean Ashton and the forward picked out Lionel Scaloni and his low right-wing cross was turned into his own net by Jamie Carragher.
It was soon 2-0 when Jose Reina spilled Matthew Etherington's shot and Ashton applied the finish from close range.
A Steven Gerrard delivery was volleyed home by Djibril Cisse after 32 minutes to hand Liverpool a lifeline.
Liverpool came out blasting after half-time, Gerrard smashed an unstoppable volley past Shaka Hislop after Peter Crouch knocked the ball down for the Reds skipper.
With 64 minutes gone, Paul Konchesky swung a cross into the Liverpool box that evaded players of both sides including Reina and the ball sailed over his head and into the back of the net.
The game was rapidly approaching injury-time before the ball fell to Gerrard and the inspirational Scouser slammed home from 35-yards to rescue his team at the death.
After an extra time littered with injured and tired players, the game would head for a shoot-out.
Alan Pardew's West Ham could have won it in the dying seconds, but an injured Marlon Harewood failed to connect clearly with his close-range volley and the ball fizzed wide of the post.
The game was to be decided by a penalty shoot-out.
Hamann, Gerrard and Riise scored for Liverpool with Hyypia missing from the spot.
Unfortunately for West Ham only Sheringham could convert, with Zamora, Konchesky and then Ferdinand failing to score as Liverpool snatched the cup.