In a final sprint, the Colombian rider of the Australian Mitchelton-Scott team defeated Britain's Simon Yates.
The Irishman scored the biggest win of his career - the first in a Grand Tour - by beating Elia Viviani (Quick Step Floors) and Niccolo Bonifazio (Bahrain-Merida) after 159km of relatively flat racing on the Italian coast.
This was the first first time an Irish rider has claimed a stage at the Giro in 31 years, since Stephen Roche won a time trial on the way to overall victory in 1987.
"I just missed it, sadly, but it's certainly within reach later ... and really I'm so pleased to be up there with the best again on one of the most iconic climbs around and in the Giro d'Italia".
'I said to [Chaves] as soon as I caught him he could take the stage because if I had enough time then I'd take the jersey. "I want to thank them all for the support, the team that's working hard behind the scenes and everybody that helped me to get to this point in my career".
New Zealand cyclist George Bennett has maintained his top 10 placing at the Giro d'Italia after stage seven on Saturday morning (NZ time).
The general classification was unchanged and Yates, who won the young rider classification at last year's Tour de France, retained his 16-second advantage over defending champion Tom Dumoulin.
Four-time Tour de France victor Froome was in eighth place, 1 minute, 10 seconds behind.
Bennett, 28, produced another solid ride, finishing with a time of 4:16:37, just 26 seconds behind stage victor, Esteban Chaves of Colombia. "For us as a team it was ideal. It was good that with not the best legs I could still hang on", said Dumoulin in his post-stage media responsibilities.
Both stage eight to Montevergine di Mercogliano and stage nine to Gran Sasso d'Italia feature summit finishes at the end of 200km+ stages, with the latter being particularly brutish with what is effectively a 47km climb (with a few short descents along the way) at the end of a massive 224km stage.