Torino entered the game with two draws and a defeat in their last three matches while Atalanta were on a poor run with just one win in nine games.
The hosts had a great chance to go ahead after quarter of an hour when Paulo Barreto found himself unmarked in front of goal but somehow he shot high over the bar.
Barreto was again involved when his cross found Alessio Cerci whose shot from the edge of the area was tipped over by Andrea Consigli.
Rolando Bianchi fired in a shot which Consigli kept out and with all the attacking being done by Torino, it was no surprise when Cerci forced another save from Consigli.
It was no shock when Atalanta went ahead three minutes before half-time when the Turin club broke quickly, Barreto found Cerci who slotted into the bottom right-hand corner.
The second half started much the same way with Torino on the attack.
Bianchi shot weakly when well placed in front of goal before the same player fired narrowly wide and Salvatore Masiello had a long-range shot comfortably held by Consigli.
The hosts came even closer to doubling their lead with a little over quarter of an hour remaining when Barreto hit the bar from the centre of the box.
However, just two minutes later Atalanta equalised when goalkeeper Jean-Francois Gillet fouled Marko Livaja.
German Denis stepped up and sent the ball down the centre to equalise.
A draw appeared to be on the cards when Torino deservedly regained the lead three minutes from time when Matteo Darmian's right-wing cross found Birsa and he slotted home a right-footed shot from close range.
As the game moved into injury time, Cerci shot from distance but Consigli punched the ball away as Torino claimed all three points.