Cavendish dedicated the victory to Belgian rider Wouter Weylandt, who died exactly two years ago after clipping a wall and crashing during a descent at the Giro.
On the victory podium, Cavendish held aloft Weylandt's No. 108, which was permanently retired from the race.
"This is a sad day for all of us," Cavendish said. "We miss him every day."
The victory was pleasant payback for Cavendish after getting dropped on a mild climb toward the end of Wednesday's stage, which was won by German sprinter John Degenkolb.
This time, with a long, straight and flat finish, Cavendish was set up perfectly by his team and had enough time to raise his arms in celebration before crossing the line.
"The team did an incredible job today," Cavendish said. "Everything was 100 per cent."
Cavendish, the British standout with the Omega Pharma-Quick Step team, clocked almost four hours over the mostly flat 168-kilometre leg from Mola di Bari to Margherita di Savoia.
Elia Viviani, an Italian with Cannondale, crossed second, and Matthew Goss, an Australian with Orica-GreenEdge, was third, both with the same time as Cavendish.
Defending champion Ryder Hesjedal of Victoria was 52nd in the stage and remained fifth overall, 34 seconds behind Paolini.
It was the 12th Giro stage win of Cavendish's career and his 99th victory overall. The Isle of Man rider also won the opening stage in Naples.
In cycling's three Grand Tours, the Giro, Tour de France and Spanish Vuelta, Cavendish has won a combined 38 stages.
In the overall standings, Paolini remained 17 seconds ahead of Rigoberto Uran, a Colombian with Sky and 26 seconds in front of Benat Intxausti Elorriaga, a Spaniard with Movistar.
Overall favourites Vincenzo Nibali and Bradley Wiggins remained fourth and sixth, respectively.
Wiggins had to change bikes with about 30 kilometres to go during the stage, which followed the Adriatic coast before a short finishing circuit. Several Sky riders waited to escort Wiggins back to the main pack, which became tougher when they were slowed by a crash that split the pack into two, but they eventually caught up.
Ji Cheng, the first Chinese rider to enter the Giro, withdrew before the start of the stage due to a fever.
"We don't want to take any risks. Health comes first," the Argos-Shimano team physician Edwin Achterberg said.
The race remains along the Adriatic coast for stage seven on Friday, a hilly 176-kilometre leg from San Salvo to Pescara.
On Saturday, the overall standings should see a major shakeup with a 55-kilometre individual time trial from Gabicce Mare to Saltara.
The race ends on May 26 in Brescia.