Lampaert (Deceuninck-Quick Step) clocked 21min 58sec over the 19.2km course in Goms to finish five seconds ahead of team-mate Kasper Asgreen and 10 in front of Søren Kragh Andersen (Sunweb).
“I didn’t expect it, because before the start I thought I didn’t have the best feelings, but I just gave it my all and rode full gas," Lampaert said.
"To beat so many riders, so many specialists of the discipline, including the World Champion, it’s just incredible and feeds my confidence ahead of next week’s Nationals.
"It’s my first World Tour ITT win and it’s just crazy. I’m surprised, but at the same time, so, so happy."
While Lampaert was surprising himself, Bernal was taking his time trial to the limit, almost falling when his back wheel slipped on a high-speed corner.
His edgy riding kept him 22 seconds ahead of Australian Rohan Dennis (Bahrain-Merida) on the general classification, losing only 19 of the 41 seconds he held prior to the ride against the clock.
“It’s for sure a surprise for me to be here in the yellow jersey," Bernal said. "This morning I thought that maybe I would lose yellow and now I’m still here.
"I was in a fight for this jersey with the world time trial champion so I should be happy with the performance.
“In a left-hand corner I almost fell and I was a little bit scared because I took the corner really fast. It was a risk but I think that I took a couple of seconds in the corner."
The final stage in Goms is a mountainous 144km which should suit the precocious 22-year-old Colombian.
“Tomorrow I think we should just try to keep the jersey, not do anything crazy," he said. "There’s one day to go. If Bahrain wants to win the race they will try something but we just need to keep hold of it.”