Fulham appeared on course to make Wolves wait at least another day to seal a place in next year's top flight, but Maupay's last-gasp leveller means that Nuno Espirito Santo's men have achieved their target with four matches to spare.
As for Fulham, they now sit outside of the automatic places in the Championship standings with Cardiff City holding a one-point advantage with a game in hand.
Brentford had the better of the opening stages at Craven Cottage, and the visitors could count themselves unfortunate not to go in front when Ollie Watkins was wrongly adjudged to be offside after being played through on goal.
However, the better opportunities went the way of Brentford with Bettinelli having to be alert to tip a header from Yoann Barbet over the crossbar, before the same player sent a free header off target at the back post.
The Bees continued to press, and shortly before the half-time whistle Dean Smith's team should have been awarded a penalty when a player in the wall stuck out a hand to prevent Barbet's set piece from finding the target.
Fulham needed to improve and they nearly found an opening goal after the restart when Mitrovic directed a header off target under pressure from a defender.
Back up the other end, Sergi Canos curled narrowly wide for Brentford and the game in West London remained there for the taking heading into the final half-hour.
However, with 20 minutes left, Fulham managed to get in front ahead through Mitrovic, who struck a first-time strike with his left foot from the edge of the area which found the net via the inside of the post.
The Cottagers began to find themselves in the ascendancy on a more regular basis, and Tom Cairney nearly wrapped up the points for Slavisa Jokanovic's team when curling just wide of the top corner from 25 yards out.
Brentford went back on the offensive during the closing stages but the closest that they came to an equaliser was from a mishit delivery from Barbet, with Bettinelli getting across to claw the ball off the line.
That was until the fourth minute of added-on time, when Maupay met a header sent back across goal to head past Bettinelli and into the net from six yards, sparking scenes of jubilation in the away end and in the West Midlands.
Fulham mounted one last attack but Brentford were able to survive and while Jokanovic witnessed his team extend their lengthy unbeaten record, the Serbian will acknowledge that his team are now underdogs for a top-two place.
FULHAM (4-3-3) Bettinelli; Fredericks, Odoi, Ream, Targett; Johansen (Norwood 90'), McDonald, Cairney; Piazon (Kebano 54', Christie 87'), Mitrovic, Sessegnon
BRENTFORD (4-5-1) Bentley; Dalsgaard, Mepham, Bjelland (Egan 46'), Barbet; Jozefzoon, Yennaris (Mokotjo 78'), Woods, Sawyers, Canos (Maupay 69'); Watkins