The Colombian sprinter was poorly positioned going into the final 300m, despite his Quick-Step Floors team working hard to battle with Bora-Hansgrohe on the front of the peloton.
Bora-Hansgrohe once again performed a near-perfect lead-out effort as they put Bennett in a prime position to take his first Grand Tour stage win, with the Irishman unleashing his sprint at the perfect moment for 200m to go.
At that point Gaviria was so far back that he was barely in shot from the helicopter camera, but the Colombian picked the perfect line down the right of the road as he swept past team-mate Maximiliano Richeze and a frustratedly boxed-in Caleb Ewan (Orica-Scott).
That move enabled him to carry plenty of speed into the final 150m, where he overhauled Bennett 25m before the line, raising his arms in celebration to continue his dream Grand Tour debut.
As for the overall contenders, there was no change at the top of the general classification, with the riders happy to save their legs for Saturday's summit finish to Oropa
How it happened
Stage 13 of the Giro d'Italia saw the riders face the prospect of 167 tediously flat kilometres from Reggio Emilia to Tortona, with four riders going clear with the first attack of the day.
They were Pavel Brutt (Gazprom - Rusvelo), Matej Mohoric (UAE Team Emirates), Vincenzo Albanese (Bardiani-CSF), and Johann Van Zyl (Dimension Data), although Van Zyl was called back to the bunch, presumably on team orders.
With this probably being the last chance for the sprinters to grab a stage win at this Giro, the break were only allowed a very short leash, enjoying a maximum advantage of just two minutes.
That was never going to be enough for them even survive close to the finish, and as the sprinters' teams started to get organised the break was caught with 22km remaining.
From there the race remained very controlled as no team came to the front to raise the pace, the bunch spread right across the wide road into Tortona as they rode into a headwind.
Finally, with five kilometres remaining, the Bora-Hansgrohe and Quick-Step Floors trains began to form on the left of the peloton and the speed began to increase.
As was the case on stage 12, Bora-Hansgrohe had their entire team on the front in support of Sam Bennett, having a drag race with Quick-Step on the opposite side of the road.
But under the flamme rouge and Bora continued to control the front of the group, with Gaviria detached from the back of the Quick-Step lead-out train.
All looked set for Bennett to finally take his first win of the race, and he was put in a perfect position with 200m to go, but there was nothing to be done about the brilliant Gaviria, who seemed to have an extra gear compared to the rest of the sprinters, comfortably winning the stage.
Giro d'Italia, stage 13: Reggio Emilia to Tortona (167km)
1. Fernando Gaviria (Col) Quick-Step Floors, in 3-47-45
2. Sam Bennett (Irl) Bora-Hansgrohe
3. Jasper Stuyven (Bel) Trek-Segafredo
4. Roberto Ferrari (Ita) UAE Team Emirates
5. Ryan Gibbons (RSA) Dimension Data
6. Rüdiger Selig (Ger) Bora-Hansgrohe
7. Sacha Modolo (Ita) UAE Team Emirates
8. Caleb Ewan (Aus) Orica-Scott
9. André Greipel (Ger) Lotto Soudal
10. Viacheslav Kuznetsov (Rus) Katusha-Alpecin, all at same time
General classification after stage 13
1. Tom Dumoulin (Ned) Team Sunweb
2. Nairo Quintana (Col) Movistar Team, at 2-23
3. Bauke Mollema (Ned) Trek-Segafredo, at 2-38
4. Thibaut Pinot (Fra) FDJ, at 2-40
5. Vincenzo Nibali (Ita) Bahrain-Merida, at 2-47
6. Andrey Amador (CRc) Movistar Team, at 3-05
7. Bob Jungels (Lux) Quick-Step Floors, at 3-56
8. Domenico Pozzovivo (Ita) AG2R La Mondiale, at 3-59
9. Tanel Kangert (Est) Astana Pro Team, at 3-59
10. Ilnur Zakarin (Rus) Katusha-Alpecin, at 4-17
12. Steven Kruijswijk (Ned) Team LottoNL-Jumbo, at 6-07
15. Adam Yates (GBr) Orica-Scott, at 6-56
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
Henry Robertshaw began his time at Cycling Weekly working with the tech team, writing reviews, buying guides and appearing in videos advising on how to dress for the seasons. He later moved over to the news team, where his work focused on the professional peloton as well as legislation and provision for cycling. He's since moved his career in a new direction, with a role at the Department for Environment, Food and Rural Affairs.
Remco Evenepoel set for Grand Place celebrations after hero's welcome home
Message from Sir Dave Brailsford suggests Ineos Grenadiers are also interested in the world champion
By James Shrubsall • Published
BikeExchange safe from WorldTour relegation, no more 'scrapping over points to the death'
"The points system is clearly broken" says Matt White, team's head directeur sportif
By Adam Becket • Published
Fernando Gaviria frustrated as gearing issue stops him from fully sprinting on Giro d'Italia stage five
UAE-Team Emirates rider has to settle for second in Messina
By Adam Becket • Published
Fernando Gaviria makes his comeback with sprint win on stage three of Tour of Poland 2021
The Colombian sprint has been winless since September last year
By Alex Ballinger • Published