The Italian Lampre-ISD rider won in Pavullo as he took the stage in convincing fashion – a repeat of his success the previous day.
Ulissi completed the 159km course in a time of 4:06.15 as he swept to another stage victory.
Danilo Di Luca finished in second for Acqua e Sapone, with the Pole Bartosz Huzarski the new leader of the general classification.
The decisive final time trial of the race takes place on Saturday.
1 Diego Ulissi (Lampre Isd)
2 Danilo Di Luca (Acqua e Sapone)
3 Bartosz Huzarski (Team NetApp)
1 Bartosz HUZARSKI (Team NetApp)
2. Danilo Di Luca (Acqua e Sapone)
3 Diego Ulissi (Lampre Isd)