Given a Riemannian metric $g$ on the real part $X_R$ of a real affine variety $X$,
is there a "natural" way to extend $g$ to be a Riemannian metric on $X$?
I'm guessing that you mean that $X$ is a scheme defined over $\mathbb R$, with real points $X_{\mathbb R}$, and complex points $X_{\mathbb C}$ that you also denoted $X$. (I won't.)
I'll assume that $g$ is also algebraic, i.e. a section of $Sym^2(T^* X)$, and that $X_{\mathbb R}$ is Zariski dense in $X$. (So not like the twisted projective line with projective equation $x^2 + y^2 + z^2 = 0$.) So $g$ is determined on $X_{\mathbb C}$ by its values on $X_{\mathbb R}$.
Then $g$ is giving a complex-valued symmetric form on $X_{\mathbb C}$. The obvious thing to do is take the real part of that, but it may be degenerate.
For example, let $g$ be the usual metric on $\mathbb R$, times $1 + x^2$. Then $g$ is positive definite on $\mathbb R$, obviously, but degenerates at $x = \pm i$ in $\mathbb C$.