We examine a moduli problem for real and quaternionic vector bundles over a smooth complex projective curve, and we give a gauge-theoretic construction of moduli spaces for such bundles. These spaces are irreducible subsets of real points inside a complex projective variety. We relate our point of view to previous work by Biswas, Huisman and Hurtubise, and we use this to study the Gal(C/R)-action $[\mathcal{E}] \mapsto [\overline{\sigma^*\mathcal{E}}]$ on moduli varieties of semistable holomorphic bundles over a complex curve with given real structure $\sigma$. We show in particular a Harnack-type theorem, bounding the number of connected components of the fixed-point set of this action by $2^g +1$, where $g$ is the genus of the curve. In fact, taking into account all the topological invariants of a real algebraic curve, we give an exact count of the number of connected components, thus generalizing to rank $r \geq 2$ the results of Gross and Harris on the Picard scheme of a real algebraic curve.