Messi had earlier seen a penalty saved by Thibaut Courtois as PSG dominated but looked set to head into the second leg frustrated.
Mbappe, linked with a summer transfer to Madrid, was a constant threat against 13-time winners Madrid.
"It was a great game for us and I'm always ready to help my team, there are no distractions," said Mbappe, who has now scored 13 goals in his past 13 Champions League matches.
"We have to be humble and the second leg is still open. It will be a hard game but we will have the advantage and are very confident."
Madrid finished the game with zero shots on target while PSG had eight, with almost 60% of possession.
On 18 minutes, Mbappe got behind Carvajal to pick up a lofted ball over the top but scuffed his shot, allowing Thibaut Courtois to save with his feet.
Within five minutes of the restart Courtois was called upon to deny Mbappe again, the Madrid goalkeeper getting down to prevent a well-struck effort after more PSG pressure.
Mbappe was fouled in the penalty area by Carvajal in the 61st minute, allowing Messi an opportunity to score from 12 yards, but the former Barcelona player hit a tame effort that Courtois comfortably knocked away.
"I'd studied Messi's penalties a lot and I tried to play with him when I was on the line,'' Courtois said. "You've also got to have that little bit of luck.''
PSG coach Mauricio Pochettino reacted by introducing Neymar for the final 20 minutes, and in the end it was a backheel from the Brazil international that opened up Madrid and allowed Mbappe to dance between two defenders and calmly slide the ball into the far corner to earn PSG a deserved victory.
"It's a narrow win perhaps but it gives us hope for the game in Madrid," Pochettino said. "I'm happy with the performance and I hope we can continue to give this kind of performance in future."
Calling Mbappe "one of the best players in the world," Pochettino joked that his joy at the late goal turned to pain as the France forward inadvertently hit his coach's nose during a touchline celebration.
Madrid manager Carlo Ancelotti also agreed with Pochettino's assessment on Mbappe, calling him "the best player in European football."
"We didn't play well, but we are not dead yet," Ancelotti added.
"Our counter-attack didn't work today," Courtois said. "It's hard to lose, but the second leg is wide open. We have to win and we will try to do it in front of our fans, what is a great advantage."
Information from Reuters was used in this report.