Lying only 13 seconds behind Thomas overnight, Thibaut Pinot (FDJ) looked for a time bonus attacking late on the final climb. But the Welshman held on for third place on the stage, his final advantage over the Frenchman just seven seconds.
Earlier, Pinot lashed out on the tough penultimate climb up Monte Bondone totally blowing the main group apart. Thomas pegged back the gap only to find himself fending off two more attacks from the Frenchman before the final descent.
The early nine-rider break peaked with a four-minute lead but was only there to serve as the carrot, the peloton making the catch by the foot of Monte Bondone.
"The right breakaway went away, and we could ride on Gazprom-Rusvelo’s wheels until the foot of the Monte Bondone," Thomas said.
"The other teams piled on the pressure on the climb with plenty of attacks, but my decision was to try to control Pinot. After the climb, Landa just led us all the way to the finish.
“Taking the race and managing to defend a lead for two days was certainly a morale boost and a good indication for the Giro, but a three-week race is an all together different story."
Third overall at this year's Tirreno-Adriatico behind Nairo Quintana (Movistar) and Rohan Dennis (BMC), Pinot too drew confidence from his stage victory and second on GC.
"I attacked to see if (Thomas) was in trouble and for me, anyway, it was important to test myself. But once the (Monte Bondone passed) I dedicated myself to the stage victory. I knew we had to go over the last 300 metres.
"On leaving the first of the last corner, there was a great chance that I would win. I had a very good team and good feelings.
"After a lot of preparation for the Giro, I needed to make myself happy and that was the case. To finish on a stage victory is top. I leave this race with a very good morale.
It's the third straight overall victory in the race for Team Sky, Richie Porte (2015) and Mikel Landa (2016) winning the race formerly known as Giro del Trentino.
Landa finished this year's edition just 42 seconds behind Thomas in fifth fighting back to the elite group today after being dropped on Monte Bondone and should prove a worthy lieutenant for Thomas at the Tour of Italy.
Australia's Rohan Dennis (BMC) finished the race in 19th position.