American Leipheimer clocked the best time of one hour, two minutes and 44 seconds in the 55.5-km time trial, the 19th and penultimate stage, from Cognac at an average speed of 53.082 kph.
Australian Cadel Eva-ns of the Predictor Lotto team was second ahead of Russian Vladimir Karpets of Caisse d'Epargne. The 24-year-old Contador came fifth.
Evans retained second place 23 seconds behind Contador in the overall standings, eight seconds ahead of Leipheimer.
Armstrong visit
Contador, who recei-ved the visit on Saturday of seven-times Tour winner and former Discovery Channel rider Lance Armstrong, is set to become the first Spaniard to win the world's greatest race since Miguel Indurain's fifth victory in 1995.