I just visited the MathJaX page due to the Math.SE website showing some problems while loading the page. I saw some demo math equations samples at this page, when this identity actually caught my attention:
$$ \dfrac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\dfrac{e^{-2\pi}} {1+\dfrac{e^{-4\pi}} {1+\dfrac{e^{-6\pi}} {1+\dfrac{e^{-8\pi}} {1+\ldots} } } } $$
My question is how does one come up with such an identity. Could there be any motivation behind this or is this just brute force calculations and then discovering it as an identity.
As with Mariano, I too have no idea what sort of mathematical sorcery Ramanujan used, but what you have there is a special case of the Rogers-Ramanujan continued fraction (sans the $\sqrt[5]{q}$ factor).
Letting
$$R(q)=\cfrac{\sqrt[5]{q}}{1+\cfrac{q}{1+\cfrac{q^2}{1+\cdots}}}$$
the question amounts to how one might arrive at
$$R(\exp(-2\pi))=\sqrt{\phi\sqrt{5}}-\phi$$
As noted in this paper, Ramanujan had derived an explicit formula for $R(q)$ for certain special values of $q$ in his "lost notebook":
$$\begin{align*}R\left(\exp(-2\pi\sqrt{n})\right)&=\frac1{4t_n^2}\left((1-\phi t_n)\sqrt{1-t_n}-\sqrt{(1-t_n)(1+\phi t_n)^2-4\phi t_n}\right)\times \\&\left(\sqrt{(1-t_n)\left(1-\frac{t_n}{\phi}\right)^2+\frac{4 t_n}{\phi}}-\left(1+\frac{t_n}{\phi}\right)\sqrt{1-t_n}\right)\end{align*}$$
where $t_n=-\dfrac{G_{n/25}}{G_{25n}}$ and $G_n$ is the Ramanujan $G$-function (a.k.a. Ramanujan(-Weber) class invariant),
$$G_n=2^{-\frac14}q^{-\frac1{24}}\prod_{k=0}^\infty (1+q^{2k+1})=2^{-\frac14}q^{-\frac1{24}}(-q;q^2)_\infty$$
and $q=\exp(-\pi\sqrt n)$. (the details for proving it are a bit involved, but they can be seen in the linked paper, or here.)
Your case corresponds to $n=1$. Since $G_{1/n}=G_{n}$ (proven in this paper), $t_n=-1$, and making this substitution into the special formula for $R\left(\exp(-2\pi\sqrt{n})\right)$ yields the desired identity.