Media playback is not supported on this device
A day before turning 43, the oldest rider in the event beat Russian Olga Zabelinskaya, who returned from a doping ban last year, by 5.55 seconds.
Dutch rider Anna van der Breggen, winner of the road race, took bronze.
Great Britain's Emma Pooley, who, like Armstrong, came out of retirement to compete in Rio, finished 14th.
Find out how to get into cycling with our special guide.
Pooley, 33, told BBC Radio 5 live she "struggled with the blustery crosswind" on the hilly 29,7km course.
"The weather was a bit different to what we expected," she said. "I had to ditch my visor halfway round because it got steamed up.
"Some people are just better at cornering in the wet, I guess."
Armstrong became the first person to win the same road cycling event at three Olympics.
Having won the time trial at Beijing 2008, she retired in 2009 to start a family before returning to win gold at London 2012 and retiring again.
Media playback is not supported on this device
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
American Kristin Armstrong won the Olympic women's road time trial for the third time in succession with victory in Rio.