Let $X$ be a compact oriented surface of genus at least two, equipped with a Riemannian metric $g$. By the uniformization theorem for Riemann surfaces, there is a conformal universal covering map $p:D\to X$, where $D$ is the unit disc. The standard hyperbolic metric on $D$ is thus $e^{2f_0}p^*(g)$ for some function $f_0$ on $D$. This is invariant under the group of deck transformations, and so descends to a function $f$ on $X$. The hyperbolic metric has Gaussian curvature $-1$, and we deduce that $e^{2f}g$ also has curvature $-1$.

I think it is true that $f$ is the **unique** function such that $e^{2f}g$ has curvature $-1$, but this seems to be a bit harder to prove than I thought. Does anyone know a proof or reference?