I guess this is always true, if you adjust the statement appropriately.
Consider the Bott-Chern cohomology $H^*_{BC}(M):=\frac{\ker d\cap \ker d^c}{\mathop{im} dd^c}$. Since the curvature of a line bundle is a closed (1,1)-form, its Chern class can be considered as an element of the Bott-Chern cohomology. There are natural maps from $H^{1,1}_{BC}$ to the Dolbeault cohomology and to de Rham cohomology; the de Rham image of the curvature is $c_1(L)$, and the Dolbeault image is the cohomology class of $\bar\partial \partial\log|f|$, which is equal to the Dolbeault representative of the Atiyah class.
This is also seen from the commutative square that Atiyah writes
$H^1(O^*_M) \to H^2(M,{\Bbb Z}) \\ \ \ \ \downarrow \hphantom{^1(O^*_M) \to H^2(}\downarrow\\ H^1(\Omega^1_M) \to H^2(M,{\Bbb C})$\
which is valid in general situation, non-compact or non-Kahler as well.