Gerrans's win, his second in the Tour after he took the 15th stage in 2008, came two days after his team bus caused mayhem when it got stuck under the finish line's overhead banner minutes before the fast-approaching peloton reached the end of the first stage.
Belgian Jan Bakelants retained the overall leader's yellow jersey when he finished in the leading bunch after his RadioShack-Leopard team controlled the pace in the final part of the stage.
"It's great. All went perfectly well, my team took great care of me after the last climb. I had good legs, I'm happy to win," said Gerrans, who won the Milan-San Remo classic last year.
The second-category climb to the Col de Marsolino, 15 kms from the finish, was too much for the sprint specialists, including German Marcel Kittel who lost his green jersey for the points classification to Sagan.
Australian Simon Clarke capped a remarkable day for Orica-GreenEdge when he was voted the most aggressive rider of the stage after spending most of his time in the day's breakaway.