Besides being the oldest, Horner is also the first American to win the Vuelta.
Horner, who will turn 42 next month, beat nearest challenger Nibali by finishing ahead of the Italian in each of the final three mountainous stages before Sunday's 110-kilometer (68-mile) ride from Leganes to Madrid.
Michael Matthews of Australia won the 21st and final stage in a sprint through Madrid's city center.
"We only had four other teammates to help with the sprint today, but everyone did their job 100 percent to help me get the win," Matthews said after his second stage win at this Vuelta for Orica Greenedge.
This edition of the Vuelta, the 68th, had been crafted to favor strong climbers with 13 of its 21 stages set in the mountains.
And Horner made the most of it, consistently pulling away with his high riding stance and a wry smile on his face while his younger rivals agonized behind him on the summit finishes.
The veteran rider was not among the favorites entering the race, but he quickly joined them upon winning the third stage. That made him the oldest rider to ever win a stage at a grand tour, breaking the former record held by Pino Cerami, who won a Tour stage at 41 years, 2 months.
Saturday's decisive stage saw Horner resist Nibali's repeated attacks before leaving him behind in the fog as he surged up the Alto de L'Angliru peak, increasing his lead from three to 37 seconds.
Horner completed the grand tour in 84 hours, 36 minutes, 4 seconds. Nibali remained 37 seconds behind, followed by Valverde 1:36 back.
Horner turned professional in 1995. His previous wins included the Tour of Georgia in 2003, the Tour of the Basque Country, a northern region on Spain, in 2010, and the Tour of California in 2011.
Euskaltel-Euskadi, the financially troubled Basque team that Formula 1 driver Fernando Alonso is considering sponsoring, finished as the best team at the race and the only won not have a member retire. The rest of the peloton let Euskaltel-Euskadi ride in front as it entered the city.