A basketball-style first half saw the Reds go ahead through a Shkodran Mustafi own goal, only for Lucas Torreira to level before Gabriel Martinelli bagged twice to put the Gunners clear.
James Milner ensured the tie was still alive with a penalty ahead of the interval – but then, nine minutes into the second period, had a short back-pass punished by Ainsley Maitland-Niles.
Emphatic strikes at the Kop end from Alex Oxlade-Chamberlain and Divock Origi in the space of four minutes got Jürgen Klopp’s side on terms again.
Joe Willock looked to have had the last word with a swerving thump from distance, until Origi volleyed in a fifth for the Reds in stoppage-time and forced a shootout.
And the hosts were victorious from 12 yards as Caoimhin Kelleher saved brilliantly from Dani Ceballos and Curtis Jones kept his nerve to seal it.
Team news
Klopp changed his entire starting XI for the tie, with 18-year-old Neco Williams handed a first-team debut at right-back and Sepp van den Berg making his maiden start for the club in central defence.
Harvey Elliott lined up in attack and became the youngest player, at 16 years and 209 days, to ever feature for the Reds at Anfield.
First half
After an early strike from Elliott flew over the bar, Liverpool were gifted the lead on six minutes.
Oxlade-Chamberlain broke into space down the right-hand side and his bobbling cross towards the near post was sent into his own net by Mustafi as Rhian Brewster sought to pounce.
It could have been two soon after as Adam Lallana clipped a clever, angled pass into the Arsenal area for Oxlade-Chamberlain, who was unable to control.
Instead, the Reds found themselves stunned by a quickfire Gunners double.
A patient foray in the 19th minute saw Mesut Ozil afforded time in the right channel of the box to thread a pass into the middle for Bukayo Saka. His low hit was well stopped by Kelleher but Torreira was there to convert the rebound.
The equaliser shifted momentum fully behind the visitors and they wasted no time in capitalising.
From a short free-kick, Maitland-Niles was given two chances to guide in a cross and when Van den Berg attempted to clear the second, the ball struck Kelleher and Martinelli dispatched from yards out.
And the Arsenal forward extended his team’s advantage nine minutes before the break.
Liverpool were guilty of squandering possession in their own half and Ozil deftly freed Saka on the left flank to pick out the unmarked Martinelli in the box to beat Kelleher again.
Klopp’s side refused to give it up, though, and within moments of being denied a penalty claim for handball by Hector Bellerin from Naby Keita’s shot, they did win a spot-kick.
Elliott was felled by Martinelli as he tried to find space in the area and Milner stepped up to sweep home a clinical finish and bring the Reds back within reach.
Origi could even have hauled them level in stoppage-time but directed his header too high after Elliott scampered free and picked out his teammate.
Second half
The pause for half-time had no impact on the frantic nature of the game and Arsenal claimed the evening’s sixth goal within nine minutes of the restart.
Milner’s pass back to Kelleher ran short and Maitland-Niles snuck in, moving the ball into the path of Ozil, who intelligently returned it for a straightforward finish.
But given what had gone before, Liverpool still sensed there was a way back – and two goals either side of the hour mark ignited the atmosphere inside the ground.
The first came from a sumptuous swing of Oxlade-Chamberlain’s right foot, the midfielder lashing a dipping drive from 20 yards over Emiliano Martinez.
And then it was Origi, sweetly spinning around his marker at the edge of the area from substitute Jones’ pass and powering a strike past the Gunners goalkeeper.
Arsenal were not willing to buckle either, however, and Unai Emery’s charges produced the ninth goal of the night with 20 minutes remaining at Anfield.
Willock ran through the middle and let fly with a swerving blast that soared into the top corner of Kelleher’s net.
The Reds pressed for another equaliser and, incredibly, got it four minutes into the five added on. Williams battled to dig out a deep cross and Origi met it with a careful volley beyond Martinez.
Liverpool were faultless in the shootout and after Kelleher leapt superbly to deny Ceballos, it was Jones who calmly found the net to send his team into the Carabao Cup last eight.