The Gates touchdown in the third quarter gave the Dolphins their first lead of the game at 21-20.
The defense struggled in the first quarter, but later came up with three takeaways, including rookie Vincent Agnew's game-clinching interception in the final minute.
The big plays helped overcome a disastrous first quarter that featured a porous defense and two interceptions thrown by Henne.
After forcing a three-and-out on Atlanta's first series, the Dolphins defense then allowed touchdown drives of 56 yards and 83 yards. After a Matt Bryant followed Henne's second interception of the first quarter, Atlanta led 17-0.
The comeback began on the next drive after the Dolphins converted a third-and-9 from their 31 when Henne found rookie running back Daniel Thomas in the flat and Thomas turned it into a 25-yard gain.
On the next play, Hartline got behind the Atlanta defense and Henne delivered a strike for Miami's first touchdown of the preseason.
The score marked the beginning of a 28-6 run for the Dolphins.