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 (the limiting case when $b\to\infty$): $$\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 (1) by using a partial fraction decomposition of a certain product of gamma functions and integrating term-wise (the identity mentioned in the original question can be obtained by a similar approach). He also indicates that (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) $$ which follows readily from Euler's product formula for the gamma function.
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.