Englishman Simon Yates kept hold of the overall lead, staying 47 seconds ahead of defending champion Tom Dumoulin.
The rain began with the riders just over an hour from the finish line and the peloton split, with Quick-Step Floors Elia Viviani caught in the trailing bunch.
Viviani, winner of two sprint stages in this year's race, was one of the favorites to finish first in Imola.
"I guess these were favorable weather conditions for an Englishman. And also for an Irishman," a drenched Yates said. "It was a very difficult final. I think a few guys underestimated it, myself included."
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
At one point late on, the stage seemed destined to end in a battle between Bahrain-Merida's Matej Mohoric and Movistar rider Carlos Betancur.
Both carved out brief leads before being reeled in by the pack, with Bennett in the midst of the Bora-Hansgrohe team at the front of the main group, but neither of them had an answer to the Irishman's power.
"It was a tough final for a bunch sprint," said Bennett, who claimed victory with a gutsy sprint from 400m.
"There were two guys up front. I didn't know how much energy they had left so I went early because I didn't want to let the stage get away from me.
"I didn't know if I would hold the lead. It worked to my advantage ... I just had to do my sprint. I think it's a nicer win than the first one."
(Reporting by Simon Jennings in Bengaluru; Editing by Catherine Evans)
