Actually we will have two equations. One for each particle.

$\displaystyle \frac{d^2x_1}{dt^2} = -\frac{Gm_2}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2x_2}{dt^2} = \frac{Gm_1}{(x_2 - x_1)^2}$

$\displaystyle \frac{d^2(x_1 - x_2)}{dt^2} = -\frac{G(m_1 + m_2)}{(x_2 - x_1)^2}$

Now sub $\displaystyle y = x_1 - x_2$,

$\displaystyle \frac{d^2y}{dt^2} = -\frac{G(m_1 + m_2)}{y^2}$

Now we have removed the coupling between the two equations. But I think solving this is still hard...

Then I will follow what Mr.F told you below:

$\displaystyle w = \frac{dy}{dt} \Rightarrow \frac{dw}{dt} = \frac{dw}{dy}\frac{dy}{dt} = w\frac{dw}{dy} = \dfrac{d\left(\frac{w^2}2\right)}{dy}$

So in our D.E:

$\displaystyle \frac{d^2y}{dt^2} = \dfrac{d\left(\frac{w^2}2\right)}{dy} = -\frac{G(m_1 + m_2)}{y^2}$

Integrating:

$\displaystyle \frac{w^2}2 = {\color{red}+} \frac{G(m_1 + m_2)}{y} + C $

Mr F edit in red. What follows might need a slight change.
As Mr.F pointed out, to eliminate C we need boundary conditions.

So continuing the integration:

$\displaystyle w = \pm \sqrt{-\frac{2G(m_1 + m_2)}{y} + C} $

Choosing the positive solution(its actually for one of the particles. For the other, it is negative, since they are moving towards each other)

$\displaystyle \frac{dy}{dt} = \sqrt{-\frac{2G(m_1 + m_2)}{y} + C} $

$\displaystyle \int \frac{dy}{\sqrt{-\frac{2G(m_1 + m_2)}{y} + C}} = t + C' $

The above integral can be solved with a trigonometric substitution: $\displaystyle y = \frac{2G(m_1 + m_2)}{C \sin^2 t}$ to get a very ugly answer

P.S: Thank you Mr.F. I did not see that trick coming