Steven Gerrard's side went behind to an unstoppable strike from Dan McKenna in the 81st minute, but Glen McAuley levelled the scores soon after before Lewis drilled home to claim the three points.
The comeback preserves the U18s' unbeaten start to the season while taking them a point ahead of Manchester City at the top of the division.
Both sides had their chances in a lively opening 45 minutes. Rafael Camacho hit the bar with a superb effort, while at the other end Reds stopper Viteslav Jaros made a brilliant point-blank save to deny Brad Carr.
Curtis Jones, who always looked capable of making something happen in the final third, was next to go close for the Reds on 27 minutes when a solo run was ended with his shot being kept out by Jackson Smith.
LFCTV GO: Watch the goals from a dramatic 2-1 victory
After a goalless opening half, Gerrard's charges started the second period strongly.
Elijah Dixon-Bonner's fierce drive from the edge of the box looked destined for the top corner before Smith kept it out with a superb save.
Camacho then had a goal disallowed when he met a cross from Lewis, with his celebrations cut short by the offside flag.
On 65 minutes the home side went close. A surging run down the right flank from Ryan Giles saw his low cross just miss the lurking Austin Samuels in the middle of the penalty area.
A minute later, Millar had a great chance for the Reds but fired wide from a good position after excellent approach play from Lewis.
Both sides continued to look dangerous on the counter-attack as the game wore on. Jaros made a brilliant save to keep out a fierce drive from Giles before the home side opening the scoring on 81 minutes.
Luis Longstaff lost possession on the edge of his own penalty area and, when the ball found McKenna, the Wolves skipper drilled into the roof of the net.
Thankfully, Liverpool's response was outstanding.
On 84 minutes, Jones lofted a ball in from the right flank and McAuley produced a superb instinctive finish to divert the ball into the top corner of the net.
And, with two minutes remaining, Millar cut inside from the right, beat three defenders and, from his cut-back, Lewis fired home an unstoppable left-footed drive to seal a dramatic victory.
Liverpool U18s: Jaros, Larouci (Longstaff), Lewis, R Williams, Boyes, Clayton, Tagseth, Dixon-Bonner, Millar (Sharif), Jones, Camacho (McAuley).
Subs not used: Atherton, Glennon.