We study a system of strongly interacting one-dimensional (1D) bosons on a ring pierced by a synthetic magnetic flux tube. By the Fermi-Bose mapping, this system is related to the system of spin-polarized non-interacting electrons confined on a ring and pierced by a solenoid (magnetic flux tube). On the ring there is an external localized delta-function potential barrier $V(\phi)=g \delta(\phi-\phi_0)$. We study the Berry phase associated to the adiabatic motion of delta-function barrier around the ring as a function of the strength of the potential $g$ and the number of particles $N$. The behavior of the Berry phase can be explained via quantum mechanical reflection and tunneling through the moving barrier which pushes the particles around the ring. The barrier produces a cusp in the density to which one can associate a missing charge $\Delta q$ (missing density) for the case of electrons (bosons, respectively). We show that the Berry phase (i.e., the Aharonov-Bohm phase) cannot be identified with the quantity $\Delta q/\hbar \oint \mathbf{A}\cdot d\mathbf{l}$. This means that the missing charge cannot be identified as a (quasi)hole. We point out to the connection of this result and recent studies of synthetic anyons in noninteracting systems. In addition, for bosons we study the weakly-interacting regime, which is related to the strongly interacting electrons via Fermi-Bose duality in 1D systems.