A process of geometric phase generation in a composite matter-field system is considered. Two atomic modes correspond to different localizations of a single Bose–Einstein condensate (BEC). One of the trapping localizations is formed by a photonic mode of a ring cavity. The photonic mode is governed by an external harmonic field source, by dissipation and by the number of localized atoms due to their non-resonant interaction with photons. This interaction gives rise to entanglement between the BEC and the photonic mode. By varying the intensity and frequency of the external source, it is possible to create a geometric phase for the optical mode. Because of the entanglement between the state of atomic and photonic modes, geometric phase acquired by the latter causes modification of the BEC state. This modification can be revealed by studying the tunneling between the atomic localizations.