Tony Martin (Katusha-Alpecin) had set an imperious time of 40-14 over the 34.2km course, but the German had to settle for second place ultimately with Dennis blasting fastest through both intermediate time checks and continued that to the finish with a time of 40 minutes dead.
Race leader Yates put in a very respectable time of 41-37 in his least favoured discipline, finishing 1-15 back on Tom Dumoulin (Sunweb) who took third place on the stage.
The Briton will now head into the final five stages with a 56 second lead over Dumoulin having led with a 2-11 gap at the start of the day, with three difficult summit finishes to come.
How it happened
With the race really waiting to hot up later in the day with the GC riders taking to the course, there were a number of time trial riders out early to try and set a time.
Mads Pedersen (Trek-Segafredo) was the first to set a proper benchmark of 41-04, but with a tailwind out on the course that was unlikely to stand for very long.
Pedersen's team-mate Ryan Mullen was the next to come close, but the Irish champion will ultimately be disappointed with his ride after suffering cramp in the final 10km and clocking a time five seconds slower than his Danish team-mate.
Not too long after the race really began to change hands between potential stage winners. First Alex Dowsett (Katusha-Alpecin) came in with a decent time of 40-40 to take the lead, but that was beaten shortly after by Jos Van Emden (LottoNL-Jumbo), who went 13 seconds quicker.
The Dutchman didn't have long in the hot seat either before Dowsett's team-mate Tony Martin came in with a new best time, with the four-time world champion clocking in at 40-14.
Fabio Aru (UAE Team Emirates), who fell well out of contention in the GC after last weekend's mountain stages, put in an astonishing ride to finish ahead of Dowsett and temporarily on the podium with a time of 40-37 (although was later docked 20 seconds by commissaires for drafting).
Martin's benchmark still comfortably withstood any challengers at this point, but things weren't looking great for the German with Rohan Dennis taking the fastest time through both the time checks on the course.
The Australian champion was able to hold that pace to the finish, putting in a storming time of 40 minutes flat, averaging 51.3kmh throughout the ride.
It was then on to the GC riders to begin coming in. Chris Froome (Team Sky), over four minutes down on Yates, put in a decent ride to finish 35 seconds down on Dennis, pushing him to fourth overall with Thibaut Pinot (Groupama-FDJ) shedding over three minutes and Miguel Angel Lopez (Astana) well over two. Domenico Pozzovivo (Bahrain-Merida) shed more than two minutes as well, but maintains third place overall by 39 seconds over Froome.
World champion Dumoulin didn't look to be having his best time trial, but still clocked 19 seconds down on Dennis through the second time check. Meanwhile, Simon Yates was losing time as the course went on, clocking 38 seconds down on the leader through the first time check, before dropping to 1-07 (and 48 seconds off Dumoulin) at the second check.
Yates knew he'd be losing time to Dumoulin on the stage, but still had a decent buffer to maintain his maglia rosa heading into the final kilometre of the course.
Eventually Yates crossed the line comfortably inside the time to keep pink, but heads into the final road stages of the Giro with less than a minute over Dumoulin.
The Giro d'Italia continues on Wednesday with a 155km stage from Riva del Garda to Iseo.
Giro d'Italia 2018, stage 16: Trento to Rovereto (34.2km)
1 Rohan Dennis (Aus) BMC Racing Team, in 40-00
2 Tony Martin (Ger) Katusha-Alpecin, at 14s
3 Tom Dumoulin (Ned) Team Sunweb, at 22s
4 Jos van Emden (Ned) LottoNL-Jumbo, at 27s
5 Chris Froome (GBr) Team Sky, at 35s
6 Alex Dowsett (GBr) Katusha-Alpecin, at 40s
7 Chad Haga (USA) Team Sunweb, at 47s
8 Fabio Aru (Ita) UAE Team Emirates, at 57s
9 David De La Cruz (Esp) Team Sky, at 1-01
10 Vasil Kiryienka (Blr) Team Sky, at 1-04
Overall classification after stage 16
1 Simon Yates (GBr) Mitchelton-Scott, in 65-57-37
2 Tom Dumoulin (Ned) Team Sunweb, at 56s
3 Domenico Pozzovivo (Ita) Bahrain-Merida, at 3-11
4 Chris Froome (GBr) Team Sky, at 3-50
5 Thibaut Pinot (Fra) Groupama-FDJ, at 4-19
6 Rohan Dennis (Aus) BMC Racing Team, at 5-04
7 Miguel Angel Lopez (Col) Astana Pro Team, at 5-37
8 Pello Bilbao (Esp) Astana Pro Team, at 6-02
9 Richard Carapaz (Ecu) Movistar Team, at 6-07
10 George Bennett (NZl) LottoNL-Jumbo, at 7-01
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1