Norway and Serbia top the standings on 10 points, with the Norwegians in pole position thanks to a 1-0 win in Belgrade earlier in the campaign, while the Swedes will need to beat Slovenia in Stockholm to avoid relegation to League C.
Sweden took the lead against the run of play through Viktor Claesson in the 15th minute but they had no answer to the physicality of Serbia's record goalscorer Mitrovic, who headed his side level three minutes later with his 47th international goal.
That goal got Serbia back on track, and Sweden had goalkeeper Robin Olsen to thank on the half-hour mark when he pulled off a superb double save to deny Dusan Vlahovic and Dusan Tadic.
Mitrovic was unstoppable and he put them ahead just before the break, shrugging off the Swedish defence before heading home a corner.
He completed his hat-trick three minutes after halftime, ghosting in behind Daniel Sundgren and firing home Vlahovic's pass with his left foot.
Having taken his international tally to 49, the 28-year-old Mitrovic left the fray with a sore knee two minutes after Sasa Lukic fired a superb fourth to round off the scoring.
"I took a knock, it's a bruised knee and I will go to the physios now to assess the damage but I should be fit for the Norway game," the striker told Serbia's Arenasport.
Set to face Brazil, Cameroon and Switzerland in Group G at the upcoming World Cup in Qatar, the Serbs took their foot off the gas in the second half but still dominated a sorry Sweden team that looked short of both organisation and ideas.
Serbia can expect a much tougher test against Norway, who lost 2-1 to Slovenia despite taking the lead through Erling Haaland earlier in the evening, in their final group game.
"We dominated the game, we were compact and played the kind of football I want to see from the lads. The Norway game will be like a cup final, and we'll be ready for it," Serbia coach Dragan Stojkovic told Arenasport.