Thirty-three-year-old Gerrans enjoyed a textbook lead-out from team-mate Daryl Impey to beat last year's green jersey Sagan by just a quarter of a wheel and secure Orica-GreenEdge's first ever victory on the world's biggest bike race.
Spaniard Jose Joaquin Rojas (Movistar) took third place ahead of the Polish youngster Michal Kwaitkowski (Omega Pharma-Quick Step), who retained his white jersey as best young rider. World champion Philippe Gilbert (BMC) was fifth and Spain's Juan Antonio Flecha (Vacansoleil-DCM) sixth.
Belgium's Jan Bakelants (RadioShack-Leopard) finished the lumpy 145.5km stage safely in a main pack of 72 riders to retain his slender one-second overall lead after three dramatic days of racing in Corsica.
“The team did a fantastic job in looking after me today,” Gerrans told Eurosport after his second career win in the Tour. “This is a stage I pin-pointed a little while ago and luckily I had the legs to win a first Tour stage for Orica-GreenEdge.”
Having finished second in Saturday’s stage two, Sagan looked to be in a commanding position to open up his account when he rounded the final bend in the wheel of his final Cannondale lead-out man.
But Gerrans swung past Impey to surge past his rival and secure his fourth win of the season.
“I managed to hold off one of the quickest guys around so I’m rapt,” he said. “It was so close and neither of us knew who won when we finished.”
Victory was a boon for Orica-GreenEdge, the second-year Australian World Tour outfit who made headlines on the weekend when their team bus was trapped under the finish gantry on the opening stage of the race at Bastia.
“Last year we had a fantastic debut season but missed out on a victory in the Tour. Now we have won stage three of the 100th Tour,” said Gerrans, who moved up to third in the overall standings.
Although denied for a second successive stage, Sagan took consolation in moving to the top of the green jersey points classification, which he now leads by 74 points to Marcel Kittel’s 57.
Argos-Shimano’s Kittel was one of numerous sprinters – including Britain’s Mark Cavendish (Omega Pharma-Quick Step) and Germany's Andre Greipel (Lotto Belisol) - to finish in a large group nine minutes down on the main pack after being distanced on the succession of leg-sapping climbs on the menu in a testing final stage in Corsica.
Played out in high temperatures and under a bright blue sky, the stage featured four categorised climbs separated by numerous hairpin bends and sinuous downhills through absolutely stunning scenery along the west coast of the Mediterranean island.
Dutchman Lieuwe Westra, who lost more than 17 minutes on Sunday’s mountainous stage through Corsica’s rugged interior, attacked the peloton from the outset.
The Vacansoleil-DCM rider was quickly joined by Gerrans’ fellow Australian and Orica-GreenEdge team-mate Simon Clarke, as well as French trio Sebastien Minard (AG2R), Alexis Vuillermoz (Sojasun) and Cyril Gautier (Europcar).
The five escapees built up a maximum lead of four minutes before being reeled in on the slopes of the final climb of the day less than 20km from the finish.
Clarke, who won stage four of the Vuelta a Espana last year en route to winning the king of the mountains competition, showed his climbing pedigree by taking maximum points over the first three summits of the day to draw level on points with Frenchman Pierre Rolland in the polka dot standings.
With the peloton closing in, Clarke attacked his fellow escapees ahead of the final climb but was reeled in by Europcar’s Rolland ahead of the summit of the Cat 2 Col de Marsolino 14km from the finish.
Rolland had attacked with team-mate Davide Malacarne in a bid to keep his polka dot jersey from shifting to the shoulders of Clarke.
Rolland crossed the summit with a 15-second lead over the pack and was joined by Sylvain Chavanel (OPQS), Euskaltel’s Mikel Nieve and Belkin’s Lars-Petter Nordhaug on the fast descent to the finish in Calvi.
Orica-GreenEdge led the chase through Cameron Meyer and the four fugitives were swept up inside the final three kilometres. Meyer then passed the baton over to Impey who launched Gerrans out of the final bend with aplomb.
Gerrans still had to beat one of the fastest finishers in the business – albeit one still recovering from his heavy fall in the opening stage of the race.
The Tour leaves Corsica for mainland France where on Tuesday the race continues with the 25km team time trial in Nice.