Let $X_1$ and $X_2$ be particles of mass $m_1$ and $m_1$, where $X_1$=$(x_1^1,x_2^1,x_3^1)$ and $X_2$=$(x_1^2,x_2^2,x_3^2)$. The potential energy of this system is $U=gm_1m_2/|X_2-X_1|)$ and $\operatorname{grad}_j(U)=(\partial U /\partial x_1^j,\partial U/\partial x_2^j,\partial U/\partial x_3^j)$.
Show that the equations of motion can be written $m_jX_j''=-\operatorname{grad}_j(U)$. Note we already know $m_1X_1''=gm_1m_2 X_2-X_1/|X_2-X_1|^3$, $m_2X_2''=gm_1m_2 X_1-X_2/|X_2-X_1|^3$.
I started writing out $\operatorname{grad}_j(U)$ given $U$, but I am not getting a negative gradient in the end, only positive... I'm not sure where the negative sign comes from.
I am not sure of the signs in the OP. In any case:
$$f(X_1,X_2):=\frac{1}{|X_2-X_1|}=\frac{1}{\sqrt{\sum_{i=1}^3 (x^1_i-x^2_i)^2}}. $$
Then
$$\frac{\partial f}{\partial x^1_j}=-\frac{1}{2\left(\sum_{i=1}^3 (x^1_i-x^2_i)^2\right)}\cdot 2 (x^1_j-x^2_j)=-\frac{x^1_j-x^2_j}{\sum_{i=1}^3 (x^1_i-x^2_i)^2}, $$
and
$$\frac{\partial f}{\partial x^2_j}=\frac{1}{2\left(\sum_{i=1}^3 (x^1_i-x^2_i)^2\right)}\cdot 2 (x^1_j-x^2_j)=\frac{x^1_j-x^2_j}{\sum_{i=1}^3 (x^1_i-x^2_i)^2}, $$ and similarly for all other partial derivatives.
Then we have
$$m_1\frac{d^2}{dt^2} (X_1)_j=-(\operatorname{grad}_1(U))_j=gm_2\frac{x^1_j-x^2_j}{\sum_{i=1}^3 (x^1_i-x^2_i)^2}, $$
and
$$m_2\frac{d^2}{dt^2} (X_2)_j=-(\operatorname{grad}_2(U))_j=-gm_1\frac{x^1_j-x^2_j}{\sum_{i=1}^3 (x^1_i-x^2_i)^2}, $$