Liverpool, which lifted the crown in 2005, will face Chelsea in the semifinals.
With six minutes left, Togo's Emmanuel Adebayor struck for Arsenal for a 2-2 scoreline that would send the Gunners through on away goals.
But one minute later Liverpool took the lead on Steven Gerrard's penalty kick before Dutch substitute Ryan Babel scored the game's sixth goal in stoppage time.
Arsenal had opened the game's scoring through Frenchman Abou Diaby. Finn Sami Hyypia equalized for Liverpool in the 30th minute, and Spaniard Fernando Torres gave Liverpool a 2-1 in the in the 69th minute for a 3-2 lead on aggregate that held until Adebayor's goal.
"It was a great night and a fantastic game, with six goals," Liverpool coach Rafael Benitez said. "Everyone is happy. Of course the amazing support here at Anfield is a big factor.
"We started very badly in the first half but the second half was much better. The players always respond to the crowd, and tonight was no exception.
"I was anxious of course when Arsenal made it 2-2, and particularly disappointed with the way Arsenal scored, but I am very happy with the reaction of the players. I was about to introduce [Andriy] Voronin because I felt we needed more power up front, but then came the penalty straight away.
"[Ryan] Babel showed his pace and ability at the end, and Steven Gerrard showed great character to take the penalty and score. I will think about Chelsea and the semifinal later. I know it will be a tough, tough tie, but first we will enjoy today."