The earliest records of ganying are in Chinese classics from the late Warring States period (475-221 BCE), when the "Hundred Schools of Thought" developed competing philosophical doctrines, including correlative resonance.
Le Blanc (1985: 9, 140) says the roots for the "key notion" of resonance can be traced back to the older strata of the Yijing, citing an early saying preserved in Hexagram 1 Qian 乾's line interpretation.