Overall race favourite Alberto Contador was left without any team mates in the Astana-led chasing pack but managed to avoid real damage, the Spaniard finishing 22 seconds behind in a group that included Clarke and Team Sky's Richie Porte.
Australian Clarke appeared to think he had the stage victory when he won the bunch sprint.
"You saw the emotion crossing the line, I was stoked to keep the jersey in the team, to be able to take the jersey and keep it for Orica for another day," Clarke told Eurosport.
"(Team mates) Michael Matthews and Simon Gerrans have had great days and today it worked for me."
Formolo attacked just before the final climb with about 13km remaining and once he reached the top with a 30-second advantage he held on for a masterful victory.
"I tried to go in a breakaway in the second last climb but the other riders caught me. I tried again on the last climb and luckily I could go to the finish line alone. Amazing," the Cannondale-Garmin rider said.
Clarke was in danger of being dropped by the chasing group but managed to re-join it on the final descent to guarantee the pink jersey would stay with his team for another day at least.
He leads by 10 seconds from team mate Esteban Chaves with Contador and his Tinkoff-Saxo colleague Roman Kreuziger a further seven seconds back.
The first proper mountain stage is on Wednesday to Abetone.
(Reporting by Martyn Herman, editing by Ed Osmond)
Share
