We present an experiment of observing the geometric phase in a superconducting circuit where the resonator and the qutrit energy levels are dispersively coupled. The drive applied to the resonator displaces its state components associated with the qutrit's ground state and first-excited state along different circular trajectories in phase space. We identify the resonator's phase-space trajectories by Wigner tomography using an ancilla qubit, following which we observe the difference between the geometric phases associated with these trajectories using Ramsey interferometry. This geometric phase is further used to construct the single-qubit *π*-phase gate with a process fidelity of 0.851±0.001.