Italian rival Fabio Aru won the mountain stage with a late breakaway and moved back into second place overall, four minutes 37 seconds behind Contador. Victoria native and 2012 Giro winner Ryder Hesjedal finished second in Friday's stage and jumped two places to seventh overall.
Aru's Astana teammate Mikel Landa dropped to third overall, 5:15 back, entering Saturday's final mountain stage before Sunday's flat finish in Milan.
Aru required nearly 6 1/2 hours over the 236-kilometre leg from Gravellona Toce to Cervinia, which included three major climbs, including an uphill finish.
Hesjedal finished 28 seconds behind, and Rigoberto Uran, the Colombian who finished second the last two years, crossed third, 1:10 back.
Contador and Landa were in a group of riders who finished 1:18 behind.
Contador showed little interest in chasing Aru, choosing to follow Landa instead.
"I was marking Landa, my biggest rival," Contador said. "Aru was the strongest today."
Contador may have also been saving his energy for Saturday's penultimate stage, a 199-kilometre leg from Saint-Vincent to Sestriere that includes a gruelling climb up a dirt road on Colle delle Finestre.
Contador has not won a stage in this year's race.
"I've been working for the pink jersey for five months," Contador said. "Winning a stage is secondary."
Contador is attempting to become the first rider since Marco Pantani in 1998 to win the Giro and Tour de France in the same year.
A two-time Tour champion, Contador won the Giro in 2008 and was also triumphant in Milan in 2011 but was stripped of that title for testing positive in the 2010 Tour.
Canada's other entry in the race, Hugo Houle of Sainte-Perpetue, Que., finished 105th in Stage 19 and was 115th overall.Suggest a correction