The victory in Sarajevo extends Juergen Klinsmann's team's record winning streak to 12 games and was also Altidore's fifth straight national team game with a goal.
Bosnia-Herzegovina, who lead Group G in European qualifying for next year's World Cup, grabbed the lead in the eighth minute when Manchester City striker Edin Dzeko beat Tim Howard with a close-range shot at the second attempt.
The home side doubled their lead on the half hour through a fine glancing header from Vedad Ibisevic but it was a very different story after the break.
Bosnia coach Safet Susic made four changes at the break and the United States took advantage of the disruption to quickly get back in the game.
Eddie Johnson slotted home in the 54th minute after Michael Bradley had found Altidore with a long ball.
Four minutes later, Johnson returned the compliment, finding Altidore who tapped home to bring the Americans level.
Zvjezdan Misimovic twice went close to putting the Bosnians back in front with long range efforts before Altidore turned it on again.
The Sunderland striker superbly curled in a free kick in the 84th minute and then two minutes later completed his hat-trick with a first-time finish after more good service from Bradley.
A fine glancing header from Dzeko in the final minute of normal time provided the prospect of a late twist but another impressive win for Klinsmann's team was the perfect tonic ahead of the Sept. 6 World Cup qualifier in Costa Rica.
- Sports & Recreation
- Juergen Klinsmann