It took an overhead shot via replay to determine where in fact Gaviria came from for even in his ciclamino jersey he was almost impossible to spot.
With around 800m to go, sprint trains looked derailed and while Bora-hansgrohe appeared organised, they fractured with 500m to go just before the difficult left-hand bend into the final straight.
But in the final 300m, Sam Bennett still looked destined to win as Caleb Ewan (Orica-Scott) was boxed in on the right-hand barrier, and then hampered by Max Richeze (QuickStep Floors) while Andre Greipel (Lotto-Soudal) struggled behind Bennett.
But Gaviria pounced, coming around Ewan and his QuickStep teammate to cross the line first ahead of Bennett and Jasper Stuyven (Trek-Segafredo).
"The sprint was fast and tense, but sprints are always like that," Gaviria said.
"To be honest, in those moments, with 400 metres left, I didn’t think I still had a chance of winning, but I decided to just give everything I had and see how things go.
"I think there were around 13 or 15 riders in front of me, and to take the victory after such a sprint it’s something special. I want to thank my team for helping me pull it off also today, the guys were incredible once again!”
It's the 22-year-old's fourth win at his first Giro d'Italia, the first time since Bernard Hinault in 1978 a rider on debut has taken four stage wins.
But the Colombian is uninterested in such things.
"Having this record doesn’t mean much for me. What is important is that it underlines the fact that I came well-prepared to the Giro d’Italia. At the same time, I am happy to take so many victories and have the maglia ciclamino going into the penultimate week-end of the race, especially as many Colombians, from fans to important athletes, came here to watch me. That really means a lot," he said.
The 167km stage from Reggio Emilia to Tortona passed uneventfully with a break of Pavel Brutt (Gazprom-Rusvelo), Matej Mohoric (UAE Team Emirates) and Vincenzo Albanese (Bardiani CSF) pulling clear from the gun but was easily reeled back in with 22 kilometres to go.
For the number crunchers: according to QuickStep, Gavria took the win after hitting a peak power of 1478W, which resulted into a 72.8 km/h top speed in the final sprint.