Steven Gerrard scored twice as Liverpool moved level on points with second-placed Manchester United.
Gerrard has scored 20 goals this season
The visitors were behind after just four minutes when Fernando Morientes placed a shot past Thomas Sorensen.
But Villa gave Liverpool a huge shock on 58 minutes when Aaron Hughes' cross reached Gareth Barry, who touched in.
Barry's equaliser was the spark for Gerrard's masterclass, the Liverpool captain scoring at the near post and then crashing a shot past Sorensen.
Villa were insipid in the first-half, but the introduction of Juan Pablo Angel after the interval gave Liverpool problems, who did not help themselves with some sloppy defending.
And even after falling 3-1 behind, Villa continued to trouble Liverpool, notably when Jose Reina quickly changed direction to save Barry's shot after it had taken a deflection off Mohamed Sissoko.
Morientes' fourth minute goal suggested Liverpool were as much concerned with improving their inferior goal difference to Manchester United as they were with winning the game.
Morientes took his goal in some style after Villa's defence had been opened up by Xabi Alonso's pinpoint pass.
Using his right foot Morientes turned inside Gary Cahill, before planting a left-footed shot past Sorensen.
But Liverpool failed to capitalise on that early goal and 10 minutes before the interval Villa wasted a great chance to equalise when in a James Milner-inspired attack the visitors outnumbered the home side by four to two.
Unfortunately for Villa, Gabriel Agbonlahor strayed offside when Milner crossed for Gareth Barry, whose header went over the bar.
At the start of the second half Villa replaced former Liverpool striker Milan Baros with Angel, who made an immediate impact.
The Colombian harried Sami Hyypia into a mistake to get in a shot and then almost embarrassed Reina who delayed too long in trying to kick clear the ball.
Angel also played an integral part in Villa's equaliser, his clever pass releasing Aaron Hughes, who cross was sidefooted home by Barry.
More nervy Liverpool defending - this time a second Hyypia mistake - presented Agbonlahor with a great chance for Villa to take the lead, but the young striker's shot was just wide.
Agbonlahor's miss proved costly and just three minutes after Barry's 58th minute goal, Gerrard restored Liverpool's lead following an Alonso corner.
Darting from left to right, Gerrard's intelligent run proved too sharp for the Villa defence, and the Liverpool captain got the the deftest of touches to send the ball past Sorensen.
Having got the better of Sorensen from close range, Gerrard then beat the Villa goalkeeper from well outside the box with a diagonal shot after substitute Robbie Fowler laid the ball into his captain's path.
Liverpool manager Rafael Benitez:
"We'll keep working to be second, but I don't really expect United to slip up with two home games left.
"It will be difficult for us, but we are close to them now.
"But they must lose and we must win our last game at Portsmouth and cut back their goal difference, but we will keep hoping."
Aston Villa manager David O'Leary:
"You can bet that I will be manager next season.
"We budgeted for 10th or 12th place, and we have not done that so this has not been a good season - we've had to use the youngsters and dig in.
"If someone else comes into the club and has money and wants to change things, so be it. But I am not expecting it."
Liverpool: Reina, Kromkamp, Hyypia, Carragher, Traore, Cisse (Sissoko 65), Alonso, Gerrard, Riise (Warnock 74), Crouch (Fowler 62), Morientes.
Subs Not Used: Dudek, Agger.
Goals: Morientes 4, Gerrard 61, 66.
Aston Villa: Sorensen, Hughes, Mellberg, Cahill, Bouma, Davis (Gardner 86), McCann, Barry (Phillips 82), Milner, Baros (Angel 45), Agbonlahor.
Subs Not Used: Taylor, Ridgewell.
Goals: Barry 58.
Ref: M Halsey (Lancashire).