Ineos' Carapaz made the most of Roglic's tough day in the Pyrenees to take an 18-second lead as the Slovenian fell to 30 seconds behind in fifth.
Roglic produced his trademark late kick in the final 500m to open a gap of just a few seconds for a comfortable win that puts him in the race leader's red jersey.
Tour de France: Tadej Pogacar crushes Primoz Roglic's 57-second lead in time trial to take grip on title
“Unbelievable, unbelievable,” 21-year-old Pogacar said after coming within touching distance of the title in only his first Tour de France. “My head will explode."
The COVID-19 pandemic has played havoc with sporting events and current French government law limits gatherings to 5,000.
Tour de France: Former champions Chris Froome, Geraint Thomas left out of Team Ineos squad for upcoming edition
Froome has been trying to get back to peak condition after he was involved in a high-speed crash at last year's Criterium du Dauphine which came close to ending his career.
Froome broke a leg, ribs and an elbow on the race in June 2019, when he hit a wall at 60km/h after taking his hands off the handlebars to blow his nose.
Froome, who suffered a horrible accident last year and returned to racing in February, said he was focused on winning his fifth Tour title with the team.
Four-time Tour de France champion Chris Froome unsure orgnanisers can prevent large crowd gatherings at 29 August race
The Tour, scheduled to start on 27 June, was pushed back to 29 August due to the outbreak. Mass gatherings have been banned in France until September, with the country recording more than 168,000 coronavirus cases and over 24,000 deaths.
Formula One needs at least 16 races for a proper championship this year but eight double-header weekends would do if the COVID-19 pandemic limits options, Nico Rosberg said.
Four-times Tour de France winner Chris Froome waits for resumption of competition after lockdown, says recovery almost complete
Four-times Tour de France winner Chris Froome said his recovery from a horrific accident last year was nearly complete and his training load was back to normal as he prepares for when competition resumes after the new coronavirus outbreak.
Four-time Tour de France winner Chris Froome to make comeback from horrific injury at UAE Tour in February
British rider Froome has not raced since he broke his right femur, elbow, hip and several ribs in a training crash as he geared up for last year's Tour de France
Chris Froome aiming to make Tour de France comeback in 2020 after fracturing thigh bone, elbow in high-speed crash
On Sunday Chris Froome plans to make a statement of intent, when he will race in an exhibition-style team time-trial for Ineos at Saitama, Japan
Kenya's Eliud Kipchoge makes history in Vienna, becomes first man to complete marathon under two-hour mark
Because of the way the run was set up and paced, the International Association of Athletics Federations (IAAF) will not validate the time as a world record
Chris Froome sets sights on record-equalling fifth Tour de France crown next year after crashing out of 2019 edition
British cycling great Chris Froome is determined to bid for a record-equalling fifth Tour de France crown next year after the horrific injuries he suffered in a crash ruled him out of this year's edition.
Chris Froome was involved in an accident and crashed into a wall with the force of the impact fracturing his pelvis, right femur, and left him with broken ribs and a broken right elbow.
Tour de France: Four-time winner Chris Froome out of competition after breaking leg, hip, arm in horror crash
Froome's dream of a fifth Tour de France title this year was over after a gust of wind hurtled him into a wall towards the end of a "recon" ahead of the Criterium du Dauphine's fourth stage time trial.
Chris Froome will miss the Tour de France after being seriously injured in a training accident at the Criterium du Dauphine. Froome is a four time champion of the prestigious cycling event.
Giro d'Italia 2019: Movistar rider Richard Carapaz holds off local hero Vincenzo Nibali to become first Ecuadorian Grand Tour winner
Carapaz won two stages — the fourth at Frascati and 14th at Courmayeur 0151 pulling ahead on the foot of Mont Blanc in the Alps and taking the pink jersey eight days from the finish
Olympic track cycling champion Peter Kennaugh to take break to cope with 'ongoing mental health issues'
Cyclist Peter Kennaugh was also part of the Sky team that helped Chris Froome win the Tour de France in 2013 and 2015
Team Sky to be renamed Team Ineos in May after takeover by Britain's richest man Jim Ratcliffe is confirmed
Team Sky has secured the backing of Britain's richest man Jim Ratcliffe and will begin racing as Team Ineos in May, the cycling team announced.