Paul Pogba had broken the deadlock for the hosts in the first half, but a Henrikh Mkhitaryan goal against his former club early in the second half appeared to be enough for a makeshift Arsenal side to earn a point.
However, at a stadium which has seen Wenger enjoy some of the highest and lowest points of his Arsenal career, there was one final sting in the tail as Fellaini netted in the 92nd minute to officially end the visitors' hopes of qualifying for next season's Champions League via the top four.
The result leaves the Gunners still sixth in the table and 11 points adrift of fourth-placed Tottenham Hotspur with only three games remaining, whereas United move five points clear of Liverpool in the race for second place and are now guaranteed a top-four finish this season.
Wenger had one eye on the second leg of Arsenal's Europa League semi-final with Atletico Madrid on Thursday when it came to his team selection, making eight changes to his lineup including a debut for January arrival Konstantinos Mavropanos in defence.
The Frenchman was presented with a gift by Jose Mourinho and Sir Alex Ferguson before kickoff to mark his final visit to a ground which has played such an important part in his 22-year reign at Arsenal, but it was his young team that began the match in generous fashion when a sloppy pass from Granit Xhaka led to a chance for Pogba which he skewed wide.
It was Pogba who opened the scoring after just 16 minutes when he tapped the ball into an empty net after Hector Bellerin had done well to deny Alexis Sanchez from marking his first appearance against his former club with a goal at the back post.
Arsenal almost responded within four minutes with a flowing team move which ended with Ashley Maitland-Niles back-heeling the ball into the path of Mkhitaryan, who dragged his low finish narrowly wide of the target.
The visitors' best chance of the first half arrived with nine minutes remaining when Pierre-Emerick Aubameyang got on the end of Bellerin's cross, but his header lacked conviction and was easy for David de Gea to gather.
It was another example of Arsenal failing to make the most of promising positions in the final third, and they were almost punished in inadvertent fashion when Ashley Young's mis-hit cross struck the outside of the post.
The Gunners were soon back on the front foot, though, and Reiss Nelson had the final chance of the first half when he met Aubameyang's cross with a diving header, but he could not steer it on target as it flew a couple of yards wide of the far post.
The equaliser did arrive six minutes into the second half when Xhaka stole possession in midfield before feeding the ball to Mkhitaryan, who drilled his finish through the legs of Victor Lindelof and into the corner to mark his first return to Old Trafford with a goal.
The goal also saw Mkhitaryan become the first player to score both for and against Manchester United in the same Premier League season, and he threatened to add a second moments later when he cut inside but curled his finish high and wide of the target.
Wenger turned to former United forward Danny Welbeck in a bid to push for a winner, and he almost had an immediate impact when his powerful long-range strike needed to be saved by De Gea.
Fellaini then fired an effort over from the edge of the box after it had sat up nicely for him, but it looked as though the match would drift towards a stalemate until United began to apply pressure in the closing stages.
Arsenal were given a warning shot of what was to come in the 89th minute when Fellaini glanced a header against the post from a cross, with the ball rebounding back off Marcus Rashford and into the net, only for the goal to be correctly disallowed for offside.
Still the Gunners could not prevent Fellaini from grabbing the late winner, though, with the Belgian flicking Young's cross just inside the far post to leave Wenger ruing one final taste of 'Fergie Time' at a ground which has arguably defined his Arsenal career more than any other away stadium.
Wenger will at least be hoping that the scene of his first Arsenal defeat is also the scene of his last heading into Thursday's crucial Europa League semi-final second leg against Atletico Madrid, although they will travel to the Spanish capital having lost all six Premier League away games so far in 2018 - the worst record in Europe's top five leagues and their worst since 1966.
The result also means that Arsenal have lost 10 away games in a single season for the first time since 1989-90 and that they are guaranteed to end the campaign with their lowest ever points tally under Wenger.
United, meanwhile, have now clinched a top-four finish with three games to spare and are five points clear of Liverpool with a game in hand following a run of eight wins in their last nine league games.
MAN UTD (4-3-3): De Gea; Valencia, Smalling, Lindelof, Young; Herrera (Martial 64'), Matic, Pogba; Lingard (Fellaini 64'), Lukaku (Rashford 50'), Sanchez
ARSENAL (4-2-3-1): Ospina; Bellerin, Chambers, Mavropanos, Kolasinac (Monreal 64'); Maitland-Niles, Xhaka, Mkhitaryan (Willock 76'), Iwobi, Nelson (Welbeck 64'); Aubameyangbody check tags ::