Robbie Fowler and Djibril Cisse had put Kenny Dalglish’s Reds into a two-goal lead over a visiting side packed with European greats, who levelled the score in the second half through Andrea Pirlo and Giuseppe Pancaro.
But there was still time for Gerrard to shuffle into a shooting position at the edge of the box and find the far corner with a low strike to delight the partisan crowd.
The game unfolded in front of 50,000-plus supporters as vital funds were raised for the club’s official charity and its mission to create life-changing opportunities for children and young people.
And the teamsheet at Anfield featured a stellar cast of heroes from two sides who took a victory apiece in the 2005 and 2007 Champions League finals.
The likes of Jamie Carragher, Fowler, Luis Garcia, Gerrard and Dirk Kuyt were matched by Cafu, Gennaro Gattuso, Filippo Inzaghi, Kaka and Pirlo.
The visitors were the more threatening side in the early exchanges and the scourge of Liverpool in the 2007 European Cup showpiece, Inzaghi, made an ambitious attempt to undo them here on six minutes.
Cafu darted into space on the right flank and his delivery took a helpful deflection en route to Milan’s No.9, whose acrobatics could only send the ball off target.
Garcia should have put the Reds ahead on the quarter-hour, having been found unmarked in the middle of the box after a breakaway led by Gerrard and Kuyt, but uncharacteristically headed wide.
There was a near-miss from Rui Costa with a rising drive from 20 yards at the Kop end before Dalglish’s charges broke the deadlock on 25 minutes.
A lovely goal it was, too, with Glen Johnson’s precise, lifted cross from the right edge of the area allowing Fowler to get ahead of Alessandro Costacurta and flick a delicate finish into the bottom left corner.
Garcia had a punt, from Gerrard’s unselfish reverse pass into the channel, pushed over by Dida and Kuyt sent an effort of his own too high to trouble the Milan goalkeeper as Liverpool searched for a second.
But there was work to do for his opposite number three minutes before the interval.
Careful build-up play by the away team opened up space for Kaka to pick his spot from the ‘D’ – only for Jerzy Dudek to get down to his left and claw the shot around the post.
Milan fashioned the first chance of the second half as well, though Cafu would have required something extraordinary to send a first-time volley into the net, rather than the crowd, from Marco Borriello’s cross.
Instead, the Reds struck again.
It was another throwback passage of play on 51 minutes, with Patrik Berger dispatching a slide-rule pass into Cisse’s forward run for the Frenchman to coolly slot home at the Kop end.
But Milan were not ready to lie down and they halved the deficit at the match’s three-quarter mark via a trademark Pirlo free-kick.
The set-piece was perfectly placed for the classy midfielder, whose 22-yard curler over the Liverpool wall was going in all the way – much to Sander Westerveld’s despair.
Gerrard was denied the goal he and the Kop craved when he danced in from the left wing and drilled in a low shot that Christian Abbiati thwarted with his legs.
The Reds icon passed up another opportunity to net himself as Cisse picked him out from right to left, choosing to head back into the centre for Vladimir Smicer’s surge but the Czech failed to connect properly.
In the short-term, it was a costly miss, because at the other end Pancaro brought Milan level with an excellent curler from the left corner of the box beyond the reach of Westerveld.
Gerrard had the final say, though.
Just as he did in Istanbul 14 years ago, the Scouser summoned a piece of inspiration with a threaded finish from 20 yards at the Kop end to put the seal on a special afternoon’s work for all involved.