A good modern place to look is in Bruce Berndt's 1994 Ramanujan's Notebooks, Part IV, especially in Chapter 24, "Ramanujan's Theory of Prime Numbers", especially p.130, for an equivalent form of the result in question. Berndt's introduction seems to say (on page 4) that these results are in R's Notebooks 2 and 3 and in the letters he wrote to Hardy before he came to England, and refers to pp. xxiii, xxvii, 349, 351, and 352 of the Tata edition of R's Collected Papers. And on his p.130 Berndt cites page 323 of the Tata edition of R's notebooks. But I cannot check Berndt's references just now, so this answer is only a tentative answer.
I was led to Berndt by the entry for logarithmic integral in MathWorld, which cites pp.126-131 of Berndt. The corresponding Wikipedia article for the logarithmic integral cites the MathWorld one as source for the Ramanujan attribution. The Wikipedia article for the exponential integral, which is the one cited by the OP, does not.