I'd argue this idea has existed longer than written history. Many cultures worshipped trees and other plants (as well as animals), and implied the existence of "tree spirits" or "forest spirits" that most definitely had intelligence, though it might have been "slower" than human (reflecting the slow, gradual growth of the tree itself).
This isn't surprising when you consider how humans interpret reality. To the human brain, the simplest possible explanation is always "human-like intelligence". Why does a lightning strike? Some super-human sent it down to punish me. Why is the forest dying? You see, the forest is a certain antropomorphic being that's suffering, and that's why its dying. Why are our crops growing slowly? The spirit of the land doesn't like us very much, we must appease it. That's what our brains are designed for - empathy. Understanding how other brains work is the main thing you do in any society, and since our brain is so supercharged on doing so, we tend to find intelligence where there is none - it just seems like such a simple explanation to our own brains :)