Christian Benteke had just halved United's two-goal lead with a sensational overhead bicycle kick when Martial picked the ball up wide on the left, tip-toed between three defenders and tucked a shot into the bottom-right corner in front of the Stretford End.
Second-half goals from Daley Blind and Ander Herrera had put United in control and Martial's strike provided the perfect finale to an evening that had begun with David de Gea returning to the United goal following the collapse of his move to Real Madrid.
Victory saw Louis van Gaal's side return to winning ways following their 2-1 defeat at Swansea City and left them in second place, above Arsenal on goal difference and five points below leaders Manchester City.
Benteke's breath-taking goal had briefly given Liverpool hope, but instead manager Brendan Rodgers was left to reflect on a second successive defeat following their 3-0 loss at home to West Ham United.
Wayne Rooney returned to Manchester this week having created a piece of history in mid-week by scoring a record-breaking 50th England goal, but he was ruled out by injury, so Marouane Fellaini started up front with Martial on the bench.
There were cheers for De Gea as he took his place in goal and the Spaniard was given a gentle re-introduction to life at Old Trafford as United immediately put the visitors on the back foot.
It was from a mistake by De Gea's opposite number Simon Mignolet that United's best first-half chance stemmed, the Belgian bowling the ball straight at Mata, but although the ball fell kindly at Fellaini's feet, the former Everton midfielder chipped well over.
United made a change at the interval, Ashley Young replacing Memphis Depay, and the substitute was quick to make his presence felt, darting between two Liverpool defenders on the left and winning a free-kick that yielded the opening goal.
Mata rolled the set-piece to the edge of the box and with Bastian Schweinsteiger blocking off Nathaniel Clyne at the near post, Blind had the freedom of the penalty area to pick his spot.
Moments later, Blind found Schweinsteiger barrelling into the box following a short corner on the United left, but the Germany midfielder could not take the ball in his stride.
It had been a stress-free return for De Gea up to that point, but he found himself in the firing line as the hour-mark approached.
First, his scuffed kick let in Roberto Firmino, whose low cross towards Benteke was alertly cut out by Chris Smalling, before a volley from Danny Ings – in for the suspended Philippe Coutinho – obliged him to spring to his right and tip the ball behind for a corner.
Shortly after, Blind came to United's rescue, clearing Martin Skrtel's header off his own goal-line and then flying out to thwart Firmino when the ball came back into the box.
Martial made his United bow in the 65th minute, replacing Mata, and within five minutes the home side had doubled their lead.
Referee Michael Oliver pointed to the spot after Liverpool's teenage left-back Joe Gomez recklessly slid in on Herrera and the Spaniard slammed home the penalty.
Jordon Ibe's introduction enlivened Liverpool, the 19-year-old extending De Gea with a left-foot strike and then teeing up Benteke's spectacular goal with a deflected cross from the right.
But barely a minute later Martial stole everyone's thunder, slaloming into the box from wide on the left to give the United faithful a new hero to serenade.