Dainese, who had never won in the Tour of Italy before, beat Colombian Fernando Gaviria and another Italian, Simone Consonni.
Frenchman Arnaud Démare, winner of the two previous sprints, took fourth place.
The Spaniard Juan Pedro Lopez (Trek) retained the leader's pink jersey after this 203 kilometer stage without any difficulty in relief but hot and windy.
The Ecuadorian Richard Carapaz however pocketed 3 bonus seconds in an intermediate sprint to nibble a place in the provisional classification and reach second place, equal in time with the Portuguese Joao Almeida, 12 seconds behind Lopez.
The Giro was deprived before the departure from Santarcangelo di Romagna of the winner of the 10th stage, the Eritrean Biniam Girmay.
The first black rider from Africa to have won a stage in a grand tour was injured in the left eye on Tuesday on the ceremonial podium by the cork of a bottle of prosecco.
On Wednesday, in a stage where temperatures reached up to 30 degrees, the peloton most often rode together with the exception of a breakaway of two riders (Rastelli, Taglioni) joined shortly after the halfway point at the exit from Bologna.
58 kilometers from the finish, the Belgian Dries De Bondt embarked on a solo raid which ended just 1,300 meters from the line.
In the final packing, Démare drove a long sprint and was overtaken by Gaviria, himself overtaken by Dainese who took full advantage of the slipstream.
The Italian, who is 24 years old, took the third victory of his career.
Last year, he finished second in a Vuelta stage, behind Dutchman Fabio Jakobsen.
Thursday, the 12th stage, the longest of the Giro, crosses the chain of the Apennines, from Parma to Genoa, over 204 kilometers.
The course has three listed climbs favorable to adventurers despite the relatively flat last 30 kilometers.
© 2022 AFPKeywords: