Martial struck twice in the first half and completed his first senior treble after the interval at Old Trafford.
The France forward is the first United player to score a Premier League hat-trick since Alex Ferguson retired as their manager in 2013.
His heroics stole the spotlight from United team-mate Paul Pogba, who was making his first start since September 30.
Solskjaer's side, unbeaten in their last 13 games in all competitions, remain in fifth place, but they are now just two points behind fourth-placed Chelsea, who face Manchester City on Thursday.
United's first win since the coronavirus hiatus was well deserved and Solskjaer suggested Martial's role in it was down to hard work on the training ground.
"Very happy for Anthony. The third goal was a great goal, but for me the first and the second were better," he said.