The visitors enjoyed the better of the first half but were indebted to Jonas Lossl in the second, the goalkeeper saving a penalty from Aboubakar Kamara.
However, Mitrovic struck in the 91st minute to lift Fulham above Burnley and to within a point of safety, while David Wagner's side remains bottom of the table after seven straight defeats.
Mitrovic nodded wide with the best chance of a quiet first 30 minutes, while Steve Mounie came closest for Huddersfield before half-time with a header that was saved well by Sergio Rico.
Calum Chambers headed a Cyrus Christie free-kick wide as Fulham began to show more intent after the break, before Joe Bryan shot straight at Lossl after being teed up in space 12 yards out, and Mitrovic saw a header brilliantly tipped wide.
Kamara was also denied by Lossl and was then left red-faced when his spot-kick was parried by the Denmark goalkeeper after he had argued down his team-mates for the chance to try his luck from 12 yards, having forced Chris Lowe into a handball to earn the penalty.
Claudio Ranieri's side came under some pressure in the closing minutes and made the most of Huddersfield's bold finish to snatch a win.
On the break, Ryan Sessegnon cut in from the right and slid the ball to Mitrovic, who drilled beneath Lossl to send Craven Cottage into raptures.