(see also: The General Relativity from String Theory Point of View)
$\mbox ds^2=g_{\mu\nu}\mbox dx^{\mu}\mbox dx^{\nu}$ is a definitional fact from Riemannian geometry, and has nothing to do with gravity. The "physics" of General Relativity is contained in the Einstein Field equations $G_{\mu\nu}=8\pi T_{\mu\nu}$, or equivalently the Einstein-Hilbert action $\mathcal{L}=\frac1{16\pi}R$.
Deriving these results from the Polyakov action is hard, but there is a simpler standard approach that you'll find in many textbooks. In string theory, the Dilaton couples to the worldsheet
$$S_\Phi = \frac1{4\pi} \int d^2 \sigma \sqrt{-h} R \Phi(X)$$
The breaking of conformal symmetry in this action can be summarized by 3 functions known as the beta functions. In Type IIB string theory, the beta functions are:
$${\beta _{\mu \nu }}\left( g \right) = \ell _P^2\left( {{R_{\mu \nu }} + 2{\nabla _\mu }{\nabla _\nu }\Phi - {H_{\mu \lambda \kappa }}H_\nu {}^{\lambda \kappa }} \right)$$
$$ {\beta _{\mu \nu }}\left( F \right) = \frac{{\ell _P^2}}{2}{\nabla ^\lambda }{H_{\lambda \mu \nu }} $$
$$ \beta \left( \Phi \right) = \ell _P^2\left( { - \frac{1}{2}{\nabla _\mu }{\nabla _\nu }\Phi + {\nabla _\mu }\Phi {\nabla ^\mu }\Phi - \frac{1}{{24}}{H_{\mu \nu \lambda }}{H^{\mu \nu \lambda }}} \right) $$
Setting these functions to zero (i.e. to require conformal symmetry, expecting to obtain the vacuum Einstein-Field Equations):
$${{R_{\mu \nu }} + 2{\nabla _\mu }{\nabla _\nu }\Phi - {H_{\mu \nu \lambda \kappa }}H_\nu ^{\lambda \kappa }} = 0. $$
$${\nabla ^\lambda }{H_{\lambda \mu \nu }} = 0 . $$
$$ { - \frac{1}{2}{\nabla _\mu }{\nabla _\nu }\Phi + {\nabla _\mu }\Phi {\nabla ^\mu }\Phi - \frac{1}{{24}}{H_{\mu \nu \lambda }}{H^{\mu \nu \lambda }}} = 0 . $$
The first of these equations is a corrected form of the vacuum EFE, and the remaining equations represent analogous equations for other fields.