After initially taking second behind Italian champion Elia Viviani (Deceuninck-Quick Step), the race jury found that Viviani had deviated from his line after swerving into Trek-Segafredo rider Matteo Moschetti's path as he launched his sprint.
Gaviria had spent much of the closing metres sprinting into the wind, unable to find a wheel after being nudged by Manuel Belletti (Androni Giocattoli-Sidermec). It was all the more impressive, then, that he managed to overhaul the likes of Arnaud Démare and Pascal Ackermann in the sprint.
"I'm sorry this has happened because Elia is always correct in the sprints and didn't really do anything wrong today," said Gaviria after the finish. "For me, he won the stage today. He was just trying to do his sprint."
Watch the highlights from stage 3 of the 2019 Giro d'Italia below.