The contest was a slow burner that livened up when a trio of Gabriel's got their names on the scoresheet – Gabriel Martinelli's 20th-minute opener was cancelled out just five minutes later by Gabriel Osho, before Gabriel Jesus restored Arsenal's lead on the stroke of half time.
Luton then turned the game on its head with two goals scored by Elijah Adebayo and Ross Barkley in an eight-minute period after the break, but their lead lasted just two minutes as Kai Havertz equalised with half an hour left to play.
Arsenal pushed for a winner in the closing stages, and as a spirited Luton outfit thought they had done enough to claim a point, Declan Rice headed home a dramatic match-winner for the Gunners in the 97th-minute.
As for Luton, they remain 17th in the top-flight table and just three points above the relegation zone, with 18th-placed Everton facing Newcastle United in their game in hand on Thursday.
Considering that Arsenal have only scored in the opening 15 minutes in one of their previous 14 Premier League matches this season, few would have been surprised to see the Gunners make a slow start against a Luton side, who set up well to begin with and prevented the visitors from having any joy in the final third.
In fact, neither team had a shot on goal in the first 19 minutes of the match, but Luton put themselves in trouble just a minute later and it led to the opening goal tucked away by Martinelli from around 10 yards out.
After Luton goalkeeper Thomas Kaminski cleared the ball into touch, Jesus was first to react and quickly threw the ball into the path of Bukayo Saka – making his 200th appearance for Arsenal – who pulled the ball back towards Martinelli to roll a first-time finish into the bottom-left corner.
However, just five minutes later, the Hatters were back on level terms when Osho found space in a crowded penalty box and directed a powerful header over David Raya following an out-swinging corner from Alfie Doherty.
Jesus came close to restoring Arsenal's lead just a few minutes later, but Kaminski was alert at his near post to send the Brazilian's shot behind for a corner which ultimately came to nothing.
Kaminski was also called upon to make a fine one-handed stop to keep out a curling strike from Saka after he cut inside from the right, but the Belgian goalkeeper was unable to keep out Jesus at the third time of asking on the stroke of half time.
Indeed, a neat give-and-go between Saka and Ben White down the right flank resulted in the latter floating a delicious delivery towards Jesus at the back post, and Arsenal's No.9 headed home with ease from just a few yards out to give the Gunners the lead at the break.
In stark contrast to the first half, the second 45 began in frantic fashion and Luton equalised for the second time in the match just four minutes after break courtesy of another corner kick.
Raya did not cover himself in glory as he came off his line and failed to meet Doherty's delivery, but nothing should be taken away from Adebayo, who required strength and bravery to tower above the Arsenal backline and nod home his third goal of the season.
The goalkeeper debate at Arsenal is sure to roll on in the coming weeks as Raya was then at fault for Luton's third goal scored by former Chelsea man Barkley in the 56th minute.
Barkley, celebrating his 30th birthday, started the move by shrugging off Martin Odegaard during a driving run forward before playing a delayed one-two with Andros Townsend, and as Luton's No.6 received the ball back on the left side of the penalty area, he produced a step-over to get away from White before lashing a left-footed strike under the body of Raya from a tight angle.
Luton's lead was short-lived, though, as Havertz equalised on the hour mark with his third goal in his last four appearances, meeting Jesus's perfectly-weighted through-ball before tapping a first-time finish beyond Kaminski from close range.
Luton responded by making a triple change, including the introduction of top scorer Carlton Morris, but desperate defending was required at the other end from the Hatters to keep Arsenal at bay as the Gunners pushed for a late winner.
Luton put their bodies on the line in the closing stages and were seemingly on course to claim a hard-fought point, but there was time for one final moment of drama, as big-money summer signing Rice headed into the bottom corner from Odegaard's cross from outside the penalty box, sparking pandemonium in the away end.
Arsenal will now turn their attention to Saturday's tricky trip to Aston Villa, while Luton welcome reigning champions Manchester City to Kenilworth Road on Sunday. body check tags ::