Viviani also succeeded Marcel Kittel (Etixx-QuickStep) on the classification with Nizzolo third in a race designed for the sprinters.
"A perfect lead out means there’s only one sprint to do and that’s for the victory," Viavini said.
"Yesterday I had to sprint twice only to reposition myself and I finished eighth. Today I got what I needed for winning.
"A perfect lead out means there’s only one sprint to do and that’s for the victory. Yesterday I had to sprint twice only to reposition myself and I finished eighth. Today I got what I needed for winning."
Francisco Manchebo (Skydive Dubai), Koen de Kort (Giant-Alpecin), Silvan Dillier (BMC) and Marcin Bialoblocki (One Pro) were the rabbits on Stage 2.
Eventually all but Mancebo were swallowed up by the peloton but his resistance ended with 12km left to race as another sprint finish loomed.
One Pro Cycling and Team Wiggins were the most active at the head of the peloton in the last 10km with Bradley Wiggins himself contributing to the finishing pace.
A crash occurred at the exit of a tunnel 1km before the finish disrupting the plans of Kittel and Mark Cavendish (Dimension Data) and leaving Viviani, Modolo and Nizzolo to share the spoils.
The race continues on Stage 3 with 172km of racing ending with a punchy 3km climb featuring gradients of 12 to 17 per cent.
"Last year we didn’t see the route before the stage and I got dropped with 10km to go," Viviani said. "I have a better condition nowadays after having raced the Tour of San Luis. We’ll try to overcome the short climb at the finish and I’ll have another chance to win the overall on Sunday."