The strike came on Canada's first shot on goal in the match and only its fourth attempt at the net in the entire game.
The victory came two days after Canada suffered an emotional 4-3 loss in the final seconds of extra time against the United States and gave the country its first medal in the traditional team sports at the Summer Games since the men's basketball team took silver at the 1936 Olympics in Berlin.
With France controlling play and outshooting the Canadians 18-4, Canada pushed forward late. Matheson fed a ball into Sophie Schmidt at the top of the penalty area. Schmidt turned toward goal as the French defense retreated and hit a right-footed shot that was blocked in front by defender Sonia Bompastor.
The ball bounded across the penalty area, where Matheson ran in and one-touched the ball into an open net.
The medal symbolized a turnaround for the Canadian women's team, which a year ago lost all three matches at the Women's World Cup in Germany and was eliminated, scoring only one goal.
Both sides appeared fatigued playing their sixth game in 16 days, managing only one shot on goal combined in the first 45 minutes.
The pace picked up in the second half, with France taking control of the possession and twice hitting the post in a minute and a half.
Gaetane Thiney drove a right-footed shot off the left post in the 62nd and Elodie Thomis skipped a header off the top side of the crossbar in the 63rd.
France continued to compress the Canadians in their own end and defender Desiree Scott was forced to clear Corine Franco's shot through a crowd off the line in the 70th.
Canada occasionally threatened with counters but managed only three shots until Matheson's goal.
The victory caps Canada's best finish at a world championship, eclipsing its fourth-place finish at the 2003 Women's World Cup in the United States.