The actual quotation is from a classic book and the exact wording is: "It cannot see the wood for the trees" (Engels, 1875, p. 47). It was written in Frederick Engels' famous treatise about socialism. Engels was criticizing metaphysics and how an intense focus on individual concepts can cause people to forget their connections to a larger whole.
The vernacular phrase may have been in colloquial use before Engels wrote it in his text in the late 19th Century; however, he is the one most attributed with the statement, now.
I learned about Engels and his famous book and quotation in 1987 in my Freshman Studies seminar at Lawrence University in Appleton, Wisconsin. All freshman students are required to take Freshman Studies, a survey of classic works in literature, art, music, science, and history, in their first two terms of study.
Reference:
Engels, F. (1985). Socialism: Scientific and utopian [Reprint of 1875 text, trans. German]. New York, NY: Universal Publishers.