Winther Højlund scored the winner just seven minutes after coming off the bench after Marten de Roon had cancelled out Tyronne Ebuehi's opener for Empoli.
The victory snapped Atalanta's winless run and lifted them to within three points of fourth-placed AC Milan, who lost against Udinese on Saturday.
Empoli remain nine points above the relegation zone.
Atalanta had lost three of their last four matches, drawing the other, and were losing ground in a tight race for the Champions League spots.
They dominated but Empoli took a surprise lead on the stroke of half-time.
Atalanta defender Matteo Ruggeri intercepted a cross for Ebuehi but his attempted clearance struck Empoli forward Francesco Caputo and rebounded back to Ebuehi, who tucked it in from point-blank range.
De Roon levelled in the 58th by heading in a cross from Ruggeri, notching Atalanta's first goal in almost a month.
Atalanta snatched all three points when, four minutes from time, Mario Pašalić mishit a shot, but the ball fell to Winther Højlund who fired it home.
AAP