The Reds trailed at the break after a Christian Benteke hit, but Jordan Henderson leveled the game before Gerrard converted from 12 yards to make it 2-1.
Brendan Rodgers made four changes to the team that started the defeat to Southampton two weeks ago, with Pepe Reina, Jamie Carragher, Lucas Leiva and Henderson all coming in.
The trip to St Mary’s was notable for how well the hosts started — and it was the same here, with Daniel Agger twice being required to intervene early on to prevent an opener.
In the 16th minute, Lucas blocked a goal-bound effort inside the six-yard box before Reina executed a point-blank save to deny Gabriel Agbonlahor.
The opener came after 31 minutes when goalkeeper Brad Guzan launched a ball forward that was touched on by Agbonlahor for Benteke to smash home from the edge of the area.
Liverpool responded well, with Luis Suarez – who had already dragged wide after a superb through ball from Philippe Coutinho — being denied when one on one with Guzan.
The Villa stopper then had to be on top of his game to keep out a Gerrard lash from distance.
Within two minutes of the restart the scores were level when Coutinho once again displayed his eye for a through ball to leave Henderson with just Guzan to beat.
The England U-21 captain kept his composure before wheeling away to celebrate his fourth goal of the campaign.
It should have been 2-1 to Liverpool eight minutes later when Suarez prized open the back-line only for Coutinho to slide the ball wide of the post with only the goalkeeper to beat.
Glen Johnson then hit the post from distance before referee Lee Mason pointed to the spot for a foul on Suarez. Gerrard stepped up and navigated Guzan, who dived the right way.
Villa surged, with Andreas Weimann coming close before a diving header block from Gerrard to frustrate Benteke. Magnificent from the skipper — and he was rewarded with a kiss to the forehead from Reina.
Minutes later Reina had to tip over a mis-hit cross as Liverpool soaked up the pressure.
The visitors managed to hold on for a victory which keeps alive their hopes of European qualification.
Liverpoolfc.com journalists’ man of the match: Steven Gerrard.