Photo: Fabrice Coffrini/AFP
Katusha rider Spilak took a 52-second advantage over Damiano Caruso into the final day, and he finished four seconds behind the Italian in fifth on the day to secure the yellow jersey.
The 30-year-old also won the title in 2015, and he will go into July's Tour de France hoping to become the first man to complete the Tour of Switzerland-Grand Boucle double since Belgian great Eddy Merckx in 1974.
Australian Dennis, 27, went into the ninth stage as the favourite, and he completed the 28.6km course 29 seconds quicker than his teammate Stefan Keung as Caruso completed a BMC clean sweep of the top three.
The win was Dennis' third in time trials this season, while he also won the 6km prologue in Switzerland last week.