Goalkeeper Mark Schwarzer proved Middlesbrough's shootout saviour as the Tee-siders gunned down Arsenal in dramatic style at The Riverside.
The Australian saved from Nelson Vivas and Matthew Upson and saw Silvinho fire wide to pave the way for Hamilton Ricard, Christian Ziege and substitute Paul Gascoigne to win it.
But Boro had been just 10 minutes away from going out of the competition when Davor Suker gave a much-changed Arsenal side - which included substitute Jermaine Pennant, at 16 years and 319 days the youngest player ever to appear in a competitive game for the Gunners - the lead.
Ricard had put the home side ahead after just eight minutes. His turn past Upson left the defender for dead and the striker unleashed a powerful shot which Alex Manninger could only help into the net.
But Thierry Henry's brilliant equaliser dragged Arsenal right back in contention seven minutes before the break. Henry, who along with Suker had started to cause problems for Boro, came out on top in a duel with Paul Ince. The Frenchman took aim from 25 yards and blasted a shot across Schwarzer and into the top corner.
Yet there was little hint of the explosive finish which was to follow as Suker made it 2-1 when Arsenal were awarded a free-kick 25 yards out. Schwarzer could only parry Henry's low shot and Suker was first to react to slam the ball home.
There was to be a twist in the tail, however, as Henry was penalised for handling Ziege's 83rdminute corner as he jumped with Ricard, and the Colombian sent Manninger the wrong way to level.
Manninger did well to keep out Juninho's late effort to take the game into extra-time, with Arsenal suffering the added blow of having Ray Parlour carried off in the final minute of normal time.
The extra 30 minutes rarely looked like proving conclusive although Schwarzer had to turn a Silvinho shot over in the first minute of the second period.
Juninho was booked for diving as the home fans appealed for a second penalty, but Suker should have clinched it when he took Vivas' pass on his chest and lifted the ball over Steve Vickers only to see his effort go wide.
Boro boss Bryan Robson reaffirmed his commitment to the competition by sending out his strongest side, with Curtis Fleming replacing Phil Stamp after Saturday's 0-0 draw with Wimbledon.
Arsenal were greatly changed as Arsene Wenger fielded several players who have acted mainly as back-up in recent weeks. Vivas, Silvinho, Stefan Malz, Paolo Vernazza and Suker were all handed starts, as was midfielder Tom Black, a 20-year-old product of the youth system.
Middlesbrough: Schwarzer, Fleming, Festa, Vickers, Cooper, O'Neill (Stamp 64), Juninho, Ince (Mustoe 110), Ziege, Ricard, Deane (Gascoigne 112). Subs not used: Beresford, Armstrong. Booked: Ince, Juninho, Ricard. Goals: Ricard 8, 83 pen.
Arsenal: Manninger, Vivas, Upson, Luzhny (Weston 46), Silvinho, Black (Pennant 73), Parlour (Cole 89), Vernazza, Malz, Suker, Henry. Subs not used: Lukic, McGovan. Booked: Vivas, Suker. Goals: Henry 38, Suker 80.
Referee: M Riley (Leeds).