The 25-year-old Russian had to change bikes in the middle of the final time trial, but this upset wasn't enough to keep him from victory.
It was Etixx - Quick-Step's Tony Martin who took the spoils in the final 17.3km time trial in Lusanne, finishing in 23min 18sec. Zakarin's team-mate Simon Spilak finished second, 11 seconds behind with the race leader in third, 13 seconds back.
"I am really happy about this victory," said Martin. "This is my second win of the season. The first was in Algarve, so I had to wait a long time for my next one. It's a really nice feeling.
"Today the time trial was completely in the rain, so it was a little bit of a disadvantage, especially on the climb with the cobblestones and a few tricky corners on the downhill. But I actually didn't mind it. Before the race I thought about the mistake of last year on the downhill, and I lost by a second. So this year I was even more focused than usual. I checked the video of the parcours a few times this morning and kept my concentration really high during the race. I think this is a nice victory for me, but also for the team."
Spilak's strong time trial saw him finish second overall, 17 seconds behind Zakarin, with defending champion Chris Froome rounding out the top three, 35 seconds in arrears.
The rest of the top 10 general classification contained upcoming Giro d'Italia and Tour de France contenders with Thibaut Pinot (FDJ.fr) fourth, Rigoberto Uran (Etixx-Quick-Step) fifth, Rafal Majka (Tinkoff-Saxo) seventh, Nairo Quintana (Movistar) eighth and Tour de France champion Vincenzo Nibali (Astana) in tenth.
Zakarin finished second in Stage 5 to take the race lead from Orica-GreenEDGE's Michael Albasini.
The young rider is in his first year in the WorldTour with Katusha. In 2009 he faced a two-year ban after testing positive for the anabolic steroid methandienone. On his return to racing he spent some time in the Professional Continental ranks with RusVelo before joining Katusha this season.
"Honestly I did not expect I could win this race," said Zakarin. "Yes, I wanted to be in form here and wanted to fight for the top five. During the race I did my best, especially yesterday and today in the time trial. I worked to get the best possible result but of course this is a big surprise for me to win here. I have not analysed the results of today’s TT and I need to do that to understand what happened. All I know, I did full gas, 100 per cent, and now I am really happy. I want to thank my team – all the guys, the management, sports directors and staff for their support and great help. My victory is a victory of the whole team!"
Stage 5: 17.3km time trial, Lusanne
1 Tony Martin (GER) Etixx - Quick-Step 23min 18sec
2 Simon Spilak (SLO) Katusha 0:00:11
3 Ilnur Zakarin (RUS) Katusha 0:00:13
4 Jurgen Van Den Broeck (BEL) Lotto Soudal 0:00:19
5 Rohan Dennis (AUS) BMC Racing 0:00:22
6 Romain Bardet (FRA) AG2R La Mondiale 0:00:24
7 Jonathan Castroviejo (ESP) Movistar 0:00:25
8 Stef Clement (NED) IAM Cycling 0:00:26
9 Rafal Majka (POL) Tinkoff-Saxo 0:00:28
10 Steve Morabito (SWI) FDJ.fr 0:00:31
1 Ilnur Zakarin (RUS) Katusha 18:36:30
2 Simon Spilak (SLO) Katusha 0:00:17
3 Christopher Froome (GBR) Sky 0:00:35
4 Thibaut Pinot (FRA) FDJ.fr 0:00:49
5 Rigoberto Uran (COL) Etixx-Quick-Step 0:01:20
6 Simon Yates (GBR) Orica-GreenEDGE 0:01:21
7 Rafal Majka (POL) Tinkoff-Saxo 0:01:24
8 Nairo Quintana (COL) Movistar 0:01:42
9 Romain Bardet (FRA) AG2R La Mondiale 0:01:43
10 Vincenzo Nibali (ITA) Astana 0:01:54