Ullrich, who rides for T-Mobile, came second at over a minute behind with his German teammate Andreas Kloden coming third.
Italian Ivan Basso, who started the day at 1:25 behind Armstrong, lost his second place in the general classification after finishing in sixth place at 1:09:39. Kloden finished more than a minute faster in 1:08:16.
In fourth place was Armstrong's US Postal teammate Floyd Landis, with another American, Bobby Julich of the CSC team, finishing fifth.
The podium after the final stage into Paris on Sunday is now likely to be composed of Armstrong, Kloden and Basso.
France's Thomas Voeckler, who wore the yellow jersey for ten days, also lost the white jersey after Russian Vladimir Karpets of the Baleares team did enough to take over the lead of the classification for the race's best rider under 25 years old.
Karpets finished in eighth place at 3:33 behind Armstrong, while La Boulangere rider Voeckler, 24, finished way off the pace at 9:41.
Ullrich, who posted a good second place time of 1:07:50, will finish further down than second place for the first time in a career that saw him win the race in 1997 and come runner-up five times, three of which have been behind Armstrong.
Armstrong's record sixth yellow jersey is now virtually guaranteed. He will become the first rider to win the race six times, and he has done it in consecutive years.
After being last of the ramp of the 147 riders still left in the race the 32-year-old American started at a furious pace and led at all the intermediate points before bringing his ride home in 1:06:49. It was his 21st career stage win and 10th from time trials and prologues combined on the Tour.
Armstrong, who has done a lot of work on his time trial position and worked with experts in wind tunnels, also beat Ullrich by 1min 01sec in the race's other time trial, an unprecedented 15.5km ride up the Alpe d'Huez.
"I've done a lot of work on my position, and worked with engineers in weind tunnels. But there's also the equipment, the bike, the helmet," said Armstrong after the race.
"But I'm glad it's finished. I'm tired mentally and physically. I think it will be a big relief and a special feeling for all the peloton to arrive in Paris tomorrow."
The pace in the early part of the race against the clock was set first by Julich then Landis.
Julich, who rides for the CSC team, shook off the effects of a wrist injury to post a promising time of 1:09:37.
However minutes later Landis surprised the field to come in a few seconds later at 1:09:14.
A bunch of stage co-favourites failed to shine on the day, including Australia's Michael Rogers, who suffered painful cramps early on in his ride before finishing in a disappointing time of 1:14:00.
Top 10 results, Stage 19 (55km time trial around Besancon)
1. Lance Armstrong (USA/USP) 1hr 06min 49sec
(average: 49.4 kph)
2. Jan Ullrich (GER/MOB) at 1:01
3. Andreas Kloden (GER/MOB) 1:27
4. Floyd Landis (USA/USP) 2:25
5. Bobby Julich (USA/CSC) 2:48
6. Ivan Basso (ITA/CSC) 2:50
7. Jens Voigt (GER/CSC) 3:19
8. Vladimir Karpets (RUS/BAL) 3:33
9. Jose Luis Rubiera (SPA/USP) 3:40
10. Jose Azevedo (POR/USP) 3:49
Stage 19: Complete results
Top 10 overall (after stage 19)
1. Lance Armstrong (USA/USP) 79hr 27min 17sec
2. Andreas Kloden (GER/MOB) at 6:38
3. Ivan Basso (ITA/CSC) 6:59
4. Jan Ullrich (GER/MOB) 9:09
5. Jose Azevedo (POR/USP) 14:30
6. Francisco Mancebo (SPA/BAL) 18:20
7. Georg Totschnig (AUT/GRL) 18:46
8. Carlos Sastre (SPA/CSC) 20:10
9. Levi Leipheimer (USA/RAB) 20:31
10. Oscar Pereiro (SPA/PHO) 23:13
Stage 19: Complete overall standings
Stage 19: Category standings