Late sub Emiliano Buendia struck at the death at Villa Park to stun the Gunners on Saturday and help push Villa up to third in the table, just another point behind City.
World club champions Chelsea could not take advantage, dropping points for the third game in a row in a 0-0 draw at Bournemouth that leaves them five points behind Villa in fourth.
Liverpool's troubled title defence worsened when they dropped more points at Leeds. Arne Slot's team blew a two-goal lead and conceded in the sixth minute of added time at Elland Road in a 3-3 draw.
Buendia's winner for Villa came in the fifth minute of added time as the substitute lifted a shot through a crowded box and into the roof of the net.
"In the manner that happened at the end, obviously, it is really difficult to take," Arsenal boss Mikel Arteta told TNT Sports.
It was the third successive time that Arsenal have dropped points away from home after draws with Sunderland and Chelsea.
Villa's ninth win from their past 10 games followed a dire start to the campaign when Unai Emery's men were winless after five games.
"At the minute we're on a great run," said Matty Cash, who put Villa ahead in the 36th minute.
Leandro Trossard was a halftime substitute for Arsenal and levelled the game seven minutes later.
Buendia went on in the 87th minute and proved an inspired substitution, lifting a shot past Arsenal keeper David Raya.
Arsenal's second loss of the season was their first since August at Liverpool.
Deep into stoppage time at Leeds, Liverpool were set to move into the top five.
That was until Ao Tanaka arrived at the far post from a corner to deny Slot's team a much-needed win.
"The only ones to blame is us because we do concede these chances," Slot told Sky Sports.
Liverpool were poised for just a third league win in 10 games when Hugo Ekitike scored twice in two minutes shortly after halftime.
But Leeds responded with their own quickfire double when Dominic Calvert-Lewin converted from the penalty spot, before Anton Stach levelled two minutes later.
Dominik Szoboszlai put the visitors in front again in the 80th, but when the fourth official indicated nine minutes of added time the home crowd sensed another comeback and Tanaka delivered.
Ruben Dias, with a brilliant long-range goal, and Josko Gvardiol gave Manchester City a 2-0 lead at the break at Etihad Stadium against Sunderland and Phil Foden headed in a third in the second half.
Bruno Guimaraes scored directly from a corner in Newcastle's 2-1 win against Burnley.
The midfielder's wicked cross curled beyond Burnley goalkeeper Martin Dubravka and into the far corner in the 31st minute at St James' Park. Anthony Gordon added a second from a penalty in first-half stoppage time.
Zian Flemming pulled a goal back with a stoppage-time penalty.
Tottenham got a long-awaited home win in the league, beating Brentford 2-0. Their last victory there had been the opening game of the season against newly promoted Burnley.
That was followed by six straight games without victory in front of their own fans, but that streak was broken by first-half goals from Richarlison and Xavi Simons against coach Thomas Frank's former team.
Elsewhere, Everton moved up to fifth after a 3-0 win over Nottingham Forest.