Diamanti's deflected free-kick put Bologna in front, but they wasted a hatful of chances to make it two and were punished early in the second half when German Denis brought the Bergamese side level.
But Manolo Gabbiadini restored Bologna's advantage against the run of play and Stefano Pioli's men managed to defend the points in the face of an Atalanta onslaught.
Bologna started brightly with Gabbiadini sending in a shot which had enough power behind it, but just lacked direction.
Denis unwittingly gave the direction to the power which was in Diamanti's free-kick in the 15th minute with his deflection taking the ball beyond the reach of Andrea Consigli in the Atalanta goal.
Manfredini thought he had brought Atalanta level in the 21st minute, but play had already been stopped for an offside decision before the Bergamese defender headed the ball in.
At the other end, Frederik Sorenson lunged in at Diamanti's cross, but Consigli made a fine reflex save before Gabbiadini got the better of Consigli, but not the post, although the ball nearly went in off the goalkeeper's back.
Taider then slipped with only Consigli to beat as the home side squander another chance just before half time.
Their wastefulness was punished five minutes into the second half when Denis made a telling contribution at the right end, making use of the room left open by Federico Agliardi to shoot diagonally into the far corner.
Atalanta grew in confidence, but as they were beginning to threaten a second, Bologna regained the lead.
Gabbiadini was able to turn and guide Mathias Abero's header in from close range in the 70th minute.
The final 20 minutes were spent largely in the Bologna half with Stefano Colantuono's side searching for an equaliser, but Bologna held firm for three crucial points in their battle against relegation.