This is one of those precious cases when Ramanujan himself provided (a sketch of) a proof. The identity was published in his paper "Some definite integrals" (Mess. Math. 44 (1915), pp. 10-18) together with several related formulae.
It might be instructive to look first at the simpler identity (thei.e. the limiting case when $b\to\infty$; the identity mentioned in the original question can be obtained by a similar approach): $$\int\limits_{0}^{\infty} \prod_{k=0}^{\infty}\frac{1}{ 1 + x^{2}/(a+k)^{2}}dx = \frac{\sqrt{\pi}}{2} \frac{ \Gamma(a+\frac{1}{2})}{\Gamma(a)},\quad a>0.\qquad\qquad\qquad(1)$$ Ramanujan derives derives (1) by using a partial fraction decomposition of a certainthe product of gamma functions and $\prod_{k=0}^{n}\frac{1}{ 1 + x^{2}/(a+k)^{2}}$, integrating term-wise (the identity mentioned in, and passing to the original question can be obtained by a similar approach)limit $n\to\infty$. He also indicates that alternatively (1) is essentially implied by the factorization $$\prod_{k=0}^{\infty}\left[1+\frac{x^2}{(a+k)^2}\right] = \frac{ [\Gamma(a)]^2}{\Gamma(a+ix)\Gamma(a-ix)},\qquad\quad\qquad\qquad\qquad\qquad(2) $$$$\prod_{k=0}^{\infty}\left[1+\frac{x^2}{(a+k)^2}\right] = \frac{ [\Gamma(a)]^2}{\Gamma(a+ix)\Gamma(a-ix)},$$ which follows readily from Euler's product formula for the gamma function. Thus (1) is equivalent to the formula $$\int\limits_{0}^{\infty}\Gamma(a+ix)\Gamma(a-ix)dx=\frac{\sqrt{\pi}}{2} \Gamma(a)\Gamma\left(a+\frac{1}{2}\right).$$
There is a nice paper "Wallis-Ramanujan-Schur-Feynman" by Amdeberhan et al (American Mathematical Monthly 117 (2010), pp. 618-632) that discusses interesting combinatorial aspects of formula (1) and its generalizations.