Great Britain hit the finishing line in a time of 43.128 seconds, more than half a second faster than the French, while Germany took the bronze medal ahead of Australia.
Five months previously, Hoy and Staff had been on the losing team when the French won the world title by half a second.
"Honestly, it took every inch of effort in beating the French, who have been invincible," said Hoy.
"The French have been so dominant. We have really put all the pieces of the jigsaw together.
"We really focused on the details and to stick half a second into them, it is amazing."
Scotsman Hoy went on to become the first British Olympian for 100 years to claim three gold medals at the same Games when he also won the men's keirin and the individual sprint.
Alongside Kenny and Philip Hindes, Hoy helped to successfully defended the team sprint crown at London 2012.
Hoy also won the individual keirin title again to stand alone as Team GB's most successful Olympian, with six gold medals, ahead of Sir Steve Redgrave.
Kenny would later move in front of Hoy's tally when he won a seventh gold in the keirin at the 2020 Games in Tokyo, his ninth Olympic medal overall.