In this paper we investigate the Berry phase in Tavis-Cummings model in the rotating wave approximation. The dipole-dipole interaction between the atoms is considered. The eigenfunctions of the system are obtained and thus the Berry phase is evaluated explicitly in terms of the introduction of the phase shift. It is shown that the Berry phase can be easily controlled by the atom-cavity coupling strength, the cavity frequency detuning, which can be important in applications in geometric quantum computing.