The fifth seed finally won their second-round clash 6-3 3-6 25-23 after three hours and 57 minutes on Wimbledon's Court One, with the third set alone taking three hours, another Olympic record.
In an era dominated by Roger Federer, Rafael Nadal and Novak Djokovic, Tsonga was pleased there was something left for him.
The Frenchman said: 'It's good because this is the only way to write my name in history for the moment. With Rafa, Roger and Novak, even Andy (Murray), it's tough to go through big tournaments. So I'm really happy. I hope I will have some more.'
Raonic, who at 21 is one of the bright hopes of men's Tennis, improved throughout the match but serving second in the decider eventually proved decisive.
Remarkably, though, the record may only last a day, with the doubles match between Czech pair Tomas Berdych and Radek Stepanek and Brazil's Marcelo Melo and Bruno Soares called off at 18-18 in the third set for darkness.
Tsonga next faces Spain's Feliciano Lopez, whose grass-court pedigree shone through as he dispatched ninth seed Juan Monaco of Argentina 6-4 6-4.
Second seed Djokovic had looked slightly shaky in his opening win over Fabio Fognini, dropping the first set, but it could not have been more different today as he overcame Andy Roddick 6-2 6-1 in only 54 minutes.
In the third round Djokovic will play wild card Lleyton Hewitt from Australia, who rolled back the years with a brilliant 6-4 7-5 victory over 13th seed Marin Cilic from Croatia.
Fourth seed David Ferrer from Spain had no trouble brushing aside Blaz Kavcic 6-2 6-2 and he next meets Japanese 15th seed Kei Nishikori, a 4-6 6-4 6-1 winner over Nikolay Davydenko.
Cyprus' Marcos Baghdatis toppled 16th seed Richard Gasquet 6-4 6-4 and he will play third seed Andy Murray in the last 16 in a repeat of last month's late-night Wimbledon classic.