Team Sky’s world champion recovered from a poor position close to the barriers to take a comfortable win ahead of Norway’s Alexander Kristoff (Katusha) and Australian Mark Renshaw (Rabobank).
"I’m really, really happy and it’s nice to finally get another win," Cavendish said. "The guys just rode their hearts out again today and I’m so, so proud.
“After they did that I had to win; I had to find some gap to get through. It was just a question of waiting for that moment and then taking my chance. It was a headwind finish which probably played into my hands a little bit after leaving it late."
Wearing the red jersey for the points classification, Cavendish was always the favourite to take the 121km stage - the shortest of this year’s race.
Two riders – Martijn Keizer (Vacansoleil-DCM) and Francesco Failli (Farnese Vini) – broke clear of the bunch after just 1.5km of racing as the road headed uphill from the coastal town of Savona and into the Ligurian Apennine mountains.
The pair built up a maximum lead of five minutes as they crossed the summit of the only classified climb of the day, the Cat.4 Montezemolo, but were eventually reeled in with 22km remaining as the pace quickened in the peloton.
It was Dutchman Keizer’s fifth day riding in a break since the start of the race – and his second time alongside Italian Failli, with whom he formed part of the leading group days earlier in stage 10.
With no tight bends or technical difficulties in the lead up to the finish, Friday’s stage 13 promised a pure sprinting duel between the race’s fast men.
Boxed in on the right-hand side of the road, Cavendish also found himself shoulder-to-shoulder with new foe Roberto Ferrari, the Italian stage 11 winner who caused the mass pile-up after swerving into his British counterpart back on Danish soil in stage three.
As the road opened out in front, Cavendish spotted a gap and made his move - only to check his pace as former HTC team-mate Goss appeared to close the door. The Australian, who initially led out the sprint, faded in the final 100m, allowing Cavendish and a whole raft of riders to pass.
None could match the world champion for speed as Cavendish powered to a 10th career win in the Giro. It was the 26-year-old's third of the race – and Cavendish had time to raise three fingers in symbolic celebration as Kristoff’s late surge behind saw the Norwegian pip Renshaw for second.
“I came into the Giro in really good form and ideally I’d have liked to have been able to kind of relax through the first week but the crash changed all that," added Cavendish.
"It took me a week to really fully recover and get my legs back again. The guys are really looking after me though; they are keeping me protected throughout the stages which is perfect and I want to go to Milan and win the points jersey."
Italy’s Sacha Modolo (Colnago) took fourth ahead of compatriot Elia Favilli (Farnese Vini) while Goss was forced to settle for sixth.
There was no change in the overall standings ahead of Saturday’s first rendezvous with the mountains: Spaniard Joaquim Rodriguez (Katusha) retained a 17-second lead over Canada’s Ryder Hesjedal (Garmin-Barracuda), with Frenchman Sandy Casar (FDJ) in third at 29 seconds.
The Giro continues over the weekend with two gruelling stages - both with tough summit finishes - in the Alps.