A remarkable property of quantum mechanics in two-dimensional space is its ability to support anyons , particles that are neither fermions nor bosons. Theory predicts that these exotic excitations can exist as bound states confined near topological defects, such as Majorana zero modes trapped in vortices in topological superconductors. Intriguingly, in the simplest cases the non-trivial phase that arises when such defects are braided around one another is not intrinsically quantum mechanical; instead, it can be viewed as a manifestation of the geometric (Pancharatnam-Berry) phase in wave mechanics, which makes possible the simulation of such phenomena in classical systems. Here, we report the experimental measurement of the geometric phase owing to such a braiding process. These measurements are obtained with an interferometer constructed from highly tunable two-dimensional arrays of photonic waveguides. Our results introduce photonic lattices as a versatile platform for the experimental study of topological defects and their braiding, and complement ongoing efforts in the study of solid-state systems and cold atomic gases. The non-zero geometric phase acquired by the braiding of vortex modes in photonic waveguide lattices demonstrates their potential to serve as a platform for the study of both Abelian and non-Abelian braiding in bosonic systems.