Fourcade, 29, who won the pursuit title on Monday, thought he had lost the 15km mass start to Germany's Simon Schempp after the two men battled towards the line in a lung-bursting sprint.
They sprawled across the finish and Fourcade slammed his ski stick into the snow and shook his head in frustration, clearly thinking he had lost.
But anguish switched to delight when the photo finish gave him the gold, clocking his time at 35min 47.3sec.
The German picked up the silver a split second behind while his compatriot Erik Lesser claimed the bronze 11.2sec adrift of Fourcade.
Fourcade won two golds at the 2014 Sochi Olympics and with his tally of four now holds the record for the most Winter Olympic gold medals won by a Frenchman. Alpine skier Jean-Claude Killy won three at the 1968 Olympics in Grenoble.