The pressure was increasing on Madrid after suffering three defeats of their first five matches in the league phase.
There were also some voices raised about Mbappe since he had an unsteady beginning following the transfer from PSG during the offseason.
But he brought out a moment of true class and shot the Madrid team 1-0 up after 10 minutes at Gewiss Stadium, rolling the ball with his left before finishing low with his right.
It was the 25-year-old Mbappe's 50th goal in the Champions League, and he is joined by only Lionel Messi among the few who did it at a younger age.
Before halftime Mbappe was replaced, apparently due to a physical problem, as Charles De Ketelaere managed to equalize for Belgium from the penalty spot before the break.
However, two goals from Vinicius Junior and Bellingham within three minutes of the second half put the Madrid team into control.
Ademola Lookman's goal brought it back to 3-2, but Madrid would endure Retegui's late effort and hold on.
Only Madrid's third win in the new format league phase of the competition, the 15-time champion is now level pegging in unseeded playoff positions in 18th.
"It's a very important victory. Not everyone wins here. We suffered and competed. In the Champions League, you have to suffer," Madrid coach Carlo Ancelotti said. "It's still difficult to finish in the top eight, but we have two games left to earn points."