After world champion Filippo Ganna's win on the opening day time trial, Ulissi (UAE Emirates) produced a strong burst on the uphill finish in Agrigento after a 149km ride.
Ganna (Ineos Grenadiers) finished safely in the bunch with the overall race favourites to retain the magliot rosa going into Monday's third stage which takes the riders up Mount Etna.
Peter Sagan (Bora-Hansgrohe) looked primed to win the stage when he joined Ulissi at the front with 500m remaining but the Slovakian could not respond as the 31-year-old Ulissi accelerated to the line.
Mikkel Frolich Honore (Den) Deceuninck-Quickstep finished in third place on the stage.
Ganna remains 22 seconds ahead of Portugal's Joao Almeida in the general classification with race favourite Geraint Thomas a further second back but the Italian sprinter knows he will be handing over the jersey on Monday as the climbing starts.
A five-rider breakaway of Thomas De Gendt (Lotto Soudal), Ben Gastauer (AG2R La Mondiale), Mattia Bais (Androni Giocattoli-Sidermec), Alessandro Tonelli (Bardiani-CSF-Faizane) and Etienne Van Empel (Vini Zabu-KTM) spent the day out front before being caught with 8km remaining.
With the last 5km all uphill it was a stage made for the puncheurs like Sagan but he was left disappointed again as his 15-month wait for a race win continued.
It was Ulissi's seventh Giro stage win.
It proved another terrible day for the Astana team as young Russian Alexandr Vlasov abandoned with a stomach illness, robbing his teammate of a backup option to Jakob Fuglsang in the overall classification.
The previous day Astana's Miguel Angel Lopez crashed at high speed near the end of the time trial and needed surgery.