Arsenal limped away from Kenilworth Road with a 4-3 win after Declan Rice's stoppage-time winner spared David Raya's blushes.
The Arsenal stopper was guilty of two huge errors to hand goals to Elijah Adebayo and Ross Barkley, whose effort put Luton 3-2 up on the hour mark.
Kai Havertz made it 3-3 shortly after, and just as it looked as though Raya's errors would prove costly, up stepped Rice in the last minute of an additional six to find the back of the net and save his side.
How the game unfolded
The opening stages were unsurprisingly controlled by Arsenal, but Luton were brave on the counter and pressed high, leading to a handful of nervy moments for the visitors.
However, one poor back pass from Amari'i Bell proved to be Luton's undoing as Arsenal pounced on the mistake to take the lead. From an unnecessary throw-in, Bukayo Saka found Gabriel Martinelli and the Brazilian stabbed home the opener 20 minutes in.
Arsenal's lead would last just four minutes as the Hatters tied things up through Gabriel Osho. The centre-back rose highest from a corner and directed his header perfectly beyond David Raya and into the back of the net.
Martinelli stung the gloves of Thomas Kaminski soon after and the Luton boss had to stretch to deny a glorious curling effort from Saka shortly before half-time, but Gabriel Jesus ensured Arsenal went into the break ahead as he thumped home a header from close range.
Four minutes into the second half and Luton were level again. Raya flapped at a corner and the towering Adebayo beat him to the ball, rising highest and nodding into an empty net.
Raya was guilty of another mistake in the 57th minute as he allowed Barkley's strike to fly right through his body and beyond him to give Luton a shock, yet well-earned lead... that lasted just three minutes.
The impressive Jesus played through Havertz and the German steered home to tie things up on the hour mark as both sides continued to throw themselves forward in search of goals.
Luton's defending became increasingly hectic as Arsenal started to flex their quality, but just as it looked as though the Hatters would escape with a draw, up popped Rice in the final seconds to steal all three points.
GK: Thomas Kaminski - 7/10 - Played into danger for the first goal and helpless for the second. Actually made some nice saves to keep the score down.
CB: Teden Mengi - 7/10 - Had a tough battle up against Martinelli but gave a respectable account of himself.
CB: Gabriel Osho - 8/10 - Expertly guided his header beyond Raya to tie things up in the first half. Controlled proceedings around him in defence.
CB: Amari'i Bell - 5/10 - A sloppy back-pass ultimately led to Arsenal's opener. Noticeably uncomfortable both in possession and when defending.
RM: Issa Kabore - 6/10 - Pressed with massive energy but switched off for the second goal and was punished. A harsh lesson for the young defender.
CM: Pelly-Ruddock Mpanzu - 6/10 - Brought immense energy to the game but didn't make much of an impact when on the ball.
CM: Ross Barkley - 8/10 - Really impressive. Pulled the strings in the first half and deserved the good fortune that came with Raya's shocking error.
LM: Alfie Doughty - 7/10 - A regular threat going forward and bagged the assists for Osho and Adebayo's headers from corners.
AM: Jacob Brown - 5/10 - Not switched on enough to make the most of Doughty's runs forwards and was fortunate to avoid picking up two yellow cards in the first half.
AM: Andros Townsend - 6/10 - Brought energy to his press but not a whole lot else. Bagged the assist for Barkley's goal.
ST: Elijah Adebayo - 7/10 - Put himself about with real energy and showed real strength to nod home after the break.
Substitutes
SUB: Chiedozie Ogbene (62' for Townsend) - 6/10
SUB: Carlton Morris (62' for Adebayo) - 6/10
SUB: Tahith Chong (62' for Brown) - 6/10
SUB: Jordan Clark (88' for Mpanzu) - N/A
SUB: Ryan Giles (88' for Doughty) - N/A
Subs not used: Tim Krul (GK), Joseph Johnson, Zack Nelson, Luke Berry
Manager
Rob Edwards - 8/10 - Demanded a response from his players and definitely got one. Luton's energy was perfect and, while they profited from some Raya howlers, it was the least they deserved. A heartbreaking result.
GK: David Raya - 2/10 - Flapped at the corner for Adebayo's header before allowing Barkley's effort directly through him. Two really poor errors.
RB: Ben White - 7/10 - A good defensive battle with Doughty and a glorious assist to set up Jesus' header late in the first half.
CB: William Saliba - 6/10 - Nice composure on the ball as Luton attempted to press him into a mistake.
CB: Gabriel Magalhaes - 5/10 - Not strong enough in the air as Luton powered home their first two goals.
LB: Jakub Kiwior - 6/10 - Solid defending in an uncomfortable position, but his attacking limitations were clear. Can hardly be blamed considering he isn't a full-back.
DM: Declan Rice - 7/10 - A strong showing in midfield. Had to be alert to Luton's press but rarely looked worried as he helped dictate the tempo of Arsenal's play. Popped up with the important goal late on.
CM: Kai Havertz - 7/10 - Smart movement from Havertz helped create both Arsenal's goals in the first half before he got in on the fun himself after the break.
CM: Martin Odegaard - 5/10 - Didn't do a whole lot wrong but was undoubtedly the quietest member of Arsenal's midfield trio.
RW: Bukayo Saka - 7/10 - Buzzed around with real energy and was a major problem for Luton's back line.
ST: Gabriel Jesus - 8/10 - A nice header but his performance was all about intelligent movement. The Brazil forward was simply too crafty for Luton's defenders to keep up with.
LW: Gabriel Martinelli - 7/10 - Did well with his unconventional finish for the opening goal. A real threat whenever he got running.
Substitutes
SUB: Oleksandr Zinchenko (64' for Kiwior) - 6/10
SUB: Leandro Trossard (64' for Martinelli) - 5/10
Subs not used: Aaron Ramsdale (GK), Reuell Walters, Cedric Soares, Mohamed Elneny, Jorginho, Reiss Nelson, Eddie Nketiah
Manager
Mikel Arteta - 5/10 - Arsenal weren't at their best here, partly due to Arteta's continued goalkeeping fiasco, but the boss can thank Rice for bailing him out of this one.