The Danes, who are ranked nine in the world, won 21-18, 21-19 after a close match, in which they came close to throwing away a big lead.
The French pair were defending European champions, but the Danes had won the two previous meetings between them.
In front of the home crowd in Horsens, the Danes took a 10-6 lead, before the French pair regained their rhythm and took a 13-12 lead.
With the match tied at 16-16, the Danes swung the first set in their favor as they never lost their cool in the decisive monents.
There wasn't much to separate the two pairs in the second set, where the Danes from 9-9 searched ahead to 14-10 following a sharp smash from Toft. And on the following point, he outplayed the French opponents by tipping the ball into the corner.
The Danes won seven successive points but struggled to close out the match as they squandered three match points before they finally won the title by converting their fourth match point.
It is the first time since 2016 that Denmark win a gold medal at the European Championships in mixed doubles.