(Abridged) Aims: We study the effects related to departures from non-local thermodynamic equilibrium (NLTE) and homogeneity in the atmospheres of red giant stars in Galactic globular cluster NGC 6752, to assess their influence on the formation of Ba II lines. Methods: One-dimensional (1D) local thermodynamic equilibrium (LTE) and 1D NLTE barium abundances were derived using classical 1D ATLAS stellar model atmospheres. The three-dimensional (3D) LTE abundances were obtained for 8 red giants on the lower RGB, by adjusting their 1D LTE abundances using 3D-1D abundance corrections, i.e., the differences between the abundances obtained from the same spectral line using the 3D hydrodynamical (CO5BOLD) and classical 1D (LHD) stellar model atmospheres. Results: The mean 1D barium-to-iron abundance ratios derived for 20 giants are <[Ba/Fe]>_{1D NLTE} = 0.05 pm0.06 (stat.) pm0.08 (sys.). The 3D-1D abundance correction obtained for 8 giants is small (~+0.05 dex), thus leads to only minor adjustment when applied to the mean 1D NLTE barium-to-iron abundance ratio for the 20 giants, <[Ba/Fe]>_{3D+NLTE} = 0.10 pm0.06(stat.) pm0.10(sys.). The intrinsic abundance spread between the individual cluster stars is small and can be explained in terms of uncertainties in the abundance determinations. Conclusions: Deviations from LTE play an important role in the formation of barium lines in the atmospheres of red giants studied here. The role of 3D hydrodynamical effects should not be dismissed either, even if the obtained 3D-1D abundance corrections are small. This result is a consequence of subtle fine-tuning of individual contributions from horizontal temperature fluctuations and differences between the average temperature profiles in the 3D and 1D model atmospheres: owing to the comparable size and opposite sign, their contributions nearly cancel each other.