We demonstrate optical control of the geometric phase acquired by one of the spin states of an electron confined in a charge-tunable InAs quantum dot via cyclic 2pi excitations of an optical transition in the dot. In the presence of a constant in-plane magnetic field, these optically induced geometric phases result in the effective rotation of the spin about the magnetic field axis and manifest as phase shifts in the spin quantum beat signal generated by two time-delayed circularly polarized optical pulses. The geometric phases generated in this manner more generally perform the role of a spin phase gate, proving potentially useful for quantum information applications.