Going into the game at the Kirkby Academy, Steven Gerrard was without key performers like Liam Millar, Glen McAuley, Rhys Williams and Paul Glatzel, while Lewis was only able to make the bench.
Sunderland took the lead through Lee Connelly but the young Reds responded after the half-time break when Lewis drilled home an unstoppable effort to make it 1-1.
Rafael Camacho then pounced to make it 2-1 after superb work from Edvard Tagseth, before the young Black Cats drew level at 2-2 through Connelly again.
With time almost up, Camacho was sent tumbling by Sunderland goalkeeper Anthony Patterson, and Lewis made no mistake with a penalty to seal a 3-2 win.
Reflecting on the victory, Gerrard told Liverpoolfc.com: “In the first half we didn’t turn up really but I sort of challenged them at half-time and told them they weren’t good enough and we needed more from them.
“They delivered in the second half. Adam [Lewis] coming on from the bench changed the game for us and also Niall Brookwell on his U18s debut came on for the last 35 minutes and was excellent.
“We had four players not available for us today because of illness and we’ve got a few injuries as well, so we were eight or nine players down, but it was an opportunity for other people to stake a claim.
“Overall a good result and a good performance in the second half but we weren’t at the races in the first.
“I’ve said to the lads can we beat Hartlepool United now in the FA Youth Cup third round and then we will have three cups to look forward to.
“Our focus now turns to the U19 game with Spartak Moscow in the UEFA Youth League on Wednesday and hopefully we can get a positive result in our final group game.”
Liverpool U18s: Jaros, Sharif, Boyes (Lewis, 45), Clayton, Glennon, Dixon-Bonner, Longstaff (Brookwell, 65), Tagseth, Larouci, Jones, Camacho.
Subs not used: Raitanen, Atherton, Cain.
LFCTV GO: Watch the goals from the 3-2 thriller