The stage had been neutralised with 9km remaining due to the atrocious conditions, leaving the sprinters free to scrap it out for the win and allowing the GC contenders an opportunity to drop back and stay safe.
Gaviria (UAE Team Emirates) launched early but it was Ackermann (Bora-Hansgrohe) who had the power, storming over for his second stage win of the race to extend his lead in the maglia ciclamino points classification.
No sooner had six riders rolled off the front of the peloton right after the official start than it was announced that Tom Dumoulin (Team Sunweb) had called it a day.
Clearly feeling the after-effects of Tuesday’s high-speed crash, the 2017 winner and last year’s runner-up decided his future would be best served resting up and concentrating on July’s Tour de France rather than risking further injury in a race he could no longer realistically win.
And who could blame Dumoulin? For it was amid torrential rain and unseasonably cold temperatures that the six escapees – which included the Dutchman’s Sunweb team-mate Louis Vervaeke – darted clear on the first of two uncategorised climbs at the start of the short but sodden 140km stage towards the Tyrrhenian coast.
Guilio Ciccone, the maglia azzurra from Trek Segafredo, was initially in the break before deciding that the paltry three KOM points on offer were not worth the candle.
With Ciccone dropping back to the peloton, Vervaeke continued on with Bardiani-CSF duo Umberto Orsini and Enrico Barbin (Bardiani-CSF), Ivan Santaromita (Nippo Vini Fantini-Faizane) and Miguel Florez (Androni Giocattoli-Sidermec).
The gap never grew much over the two-minute mark as the riders negotiated the opening climbs before gingerly negotiating the long descent towards the two intermediate sprints. Such were the slippery conditions that even the race motorcycles struggled to stay upright.
Barbin won both intermediate sprints from the break as German’s Pascal Ackermann (Bora-Hansgrohe) consolidated his lead in the maglia ciclamino standings behind.
With 70km remaining, race leader Roglic was spotted in talks with Mauro Vegni, the race director, and it was subsequently announced that, for safety reasons, the timings for the GC would be taken at the first crossing of the finish line at Terracina, leaving the sprinters to do battle on the closing circuit without posing any threat to the GC men.
On the Cat.4 climb to Sezze Vervaeke ditched his breakaway companions to pocket the maximum three points over the summit and quickly open up a 45-second gap.
The remaining four escapees were soon swallowed up by the peloton as the teams of the sprinters came to the front of the peloton to help lead the chase on the lone leader.
Vervaeke’s brave attempt for a maiden professional win came to an end with around 20km remaining, the 25-year-old nevertheless succeeding at giving his Sunweb team-mates something else to talk about over dinner than the withdrawal of their main man.
As the peloton approached the finish line for the first passage, huge puddles and deep standing water on the home straight acted as a reminder just why the race was to be neutralised ahead of the final passage of the closing circuit.
Roglic’s Jumbo-Visma team led the pack over the line with one lap and 9km remaining before all the teams of the big GC favourites dropped back, their work for the day done.
This was the cue for the teams of the sprinters to come to the fore, with Caleb Ewan’s Lotto Soudal and Fernando Gaviria’s UAE Team Emirates taking up pacing duties with Pascal Ackermann’s Bora, Arnaud Demare’s Groupama-FDJ and Elia Viviani’s Deceuninck-QuickStep all involved.
But it was also a chance for some of the smaller teams with less illustrious sprinters to grab the bull by the horns – and with 5km remaining, the Israel Cycling Academy squad of Davide Cimolai sniffed out an opportunity along with the CCC team of misfiring pocket-rocket Jakub Mareczko.
When it came to the final kilometre, however, it was business as usual for the Big Five sprinters. That was until Viviani lost his two lead-out men and failed to close the gap when Gaviria launched in the final two hundred metres.
Ackermann jumped on his wheel and, buoyed by his victory in Sunday's second stage, surged through to double up while Ewan and Demare fought for scraps behind. The young Italian Matteo Moschetti (Trek-Segafredo) completed the top five.
A second victory saw Ackermann extend his lead in the battle for the maglia ciclamino to 28 points over Gaviria. With the finish times neutralised, Roglic retained his 35-second lead over Simon Yates (Mitchelton-Scott) with Vincenzo Nibali (Bahrain Merida) a further four seconds back in third place.
Thursday's stage 6 is the second longest of the race - a 238km undulating schlep from Cassino to San Giovanni Rotondo which climaxes with a Cat.2 climb and a uphill ramp to the line.