We know from Newtonian Gravity that a description of gravity could be given and which is that there is a potential function $\phi$ whose partial derivatives give the acceleration

$$\frac{d^2\vec{x}}{dt^2}=\vec{g}=-\vec{\nabla}\phi(x)=(\frac{\partial\phi}{\partial x}\hat{x}+\frac{\partial\phi}{\partial y}\hat{y}+\frac{\partial\phi}{\partial z}\hat{z})$$

BUT in general relativity, it is known that the metric is described as the gravitational potential. I never really asked why was it the case? How was it assumed that gravitational trole is characterized by the metric $g_{\mu\nu}$?