There was only one change to the side that fell to a 2-0 defeat to Manchester City last weekend, with loan signing Ruby Mace replacing Georgia Eaton-Collins in the holding midfield role.
At the home of Tranmere Rovers, it only took nine minutes for an opening goal to be found, and it came from the travelling Foxes, when Cain fired home after a clever corner routine.
Making a late run into the box, a low delivered cross from Courtney Nevin was turned towards goal by the Welsh forward who picked up her second goal in three games, having netted a few weeks earlier in the Vitality Women's FA Cup defeat to Reading.
Five minutes later, the Foxes were in again when CJ Bott tried her luck from range. From what must have been 30 yards out, the defender took aim and unleashed a rocket, which would have nestled into the net, had Rachael Laws not tipped the effort onto the crossbar.
Over the next 20 minutes, the hosts took control of possession as they looked to get back to level terms, however the City defence was standing firm, with Sophie Howard planting her head on every ball that came into the box, although the gigantic throw-ins from Megan Campbell certainly weren't helping.
Late on in the first half, Leicester stepped it up and applied pressure on Laws in search of a two-goal lead at the break, but after a substantial amount of injury time, the scoreline would read 1-0 at the interval.
Into the second half, the Reds' fanbase started to get restless, and raised the volume inside Prenton Park in an attempt to help force the ball across City's goal line, and looked to have achieved this in the 70th minute.
A ball into the box bounced around and among all the madness, Leicester somehow managed to clear their lines, but this close encounter looked to have given Liverpool the confidence to find a breakthrough.
However, after this pressure it was the Foxes to see the next sightings of goal through Cain and Aileen Whelan. City's No.21 took aim from the edge of the box but saw her low effort claimed by Laws, before the captain had a perfect opportunity to seal the win.
Winning the ball back high up the pitch, Whelan was supplied with possession inside the Liverpool box, but instead of shooting, tried to take it round the defender, and saw the effort taken away from her.
With only seconds to go, Liverpool looked certain to score when pressure on Janina Leitzig allowed for a loose ball in the box, but after throwing absolutely everyone on the line, the Foxes managed to clear.
Against the ongoing roar of the home supporters, the final whistle eventually blew, marking an extraordinary afternoon in Liverpool, as Willie Kirk's side would be taking all three points, and the hope of league survival back with them to the Midlands.
Major moment - Cain's opener
With only one goal to separate the two sides, the defining moment of the match came less than 10 minutes in when Cain finished off a smart routine from a corner. One straight from the training ground which certainly paid off.
Who impressed? - Sophie Howard
While it was Cain who scored the only goal of the match, Howard was very impressive at the back, and along with Ashleigh Plumptre, made sure that any danger that came into the box was expertly dealt with.
Where do we stand - 12th and chasing the pack
A second win of the 2022/23 season does leave City 12th in the table, but the gap to Reading has now been reduced to a single point.
Coming up - Manchester United (A)
Heading into an international break, the Foxes are next in action when they face Manchester United at Leigh Sports Village on Sunday 5 March (12:30pm GMT kick-off), which will be broadcast live on BBC.
The details…
City: Leitzig; Bott, Howard, Plumptre, Nevin; Mace, Tierney, Whelan (C), C. Jones (Green 67') , Cain (Pike 78'), Goodwin (Baker 78').
Subs: Lambourne, Levell, Eaton-Collins, Simon, Purfield, Robinson.
Goal: Cain 8'.