Town saw off top-three opposition to reach the halfway stage of the season in eighth place, their highest position of the campaign.
The game set off well, Town winning a corner after three minutes, and the delivery to the near post saw Kieran Fletcher power a header goal wards.
The ball hit the hand of a Liverpool defender near the line, giving the referee no option but to award Town an early penalty.
Mark Threlfall stepping up, sending Liverpool keeper Stephen Longrigg the wrong way to put Town in front.
After that the first half was all Liverpool as they pressed for the equaliser.
Lyle Davy in the Town goal made a good save from Liverpool captain Liam Loughlin after 8 minutes, before two chances in as many minutes came just after the quarter of an hour mark, Davy denying Steven Jones and then Ronnie Morgan, diving high to his left to tip the ball over the bar.
But the inevitable pressure told after 28 minutes when the ball ran loose across the face of the Town goal, Morgan having the easy task of tapping the ball over the line from a yard out for a deserved equaliser.
All that Town had to offer in the first half was a Sam Howell shot that curled wide of Longrigg’s left hand post.
Town started well after the interval, Joel Melia beginning to trouble Liverpool down the right with his darting runs.
One such run saw him fouled just outside the penalty area, and the referee allowed the advantage, with his cross to the near post seeing Connor Smiths flick cleared from almost off the goal line.
At the other end, Fletcher had to make a timely tackle as Jones looked ready to pounce, the ball bouncing off Jones for a goal kick.
Melia put in two dangerous crosses in as many minutes, Jay Wynne cutting both out at the near post.
It was a much closer second half than the first, with Town possibly shading it slightly.
Then probably the best ball of the match delivered by Howell split the Liverpool defence wide open, Melia running onto it took the ball on into the penalty area before cracking a fierce shot past Longrigg to put Town in front.
Davy had to be alert with 10 minutes left as Fletcher nearly headed into his own goal, the Town keeper moving quickly to smother the ball.
Loughlin then brought a scare as he waltzed past four defenders into the area before being dispossessed.
With time running out, Town made a double substitution, Paul Fildes and Chris Ridehalgh replacing Kieran Lee and Threlfall, as they held out quite comfortably to record a well-earned win.
Tomorrow Town are at Bootle, again in league action.