Garuḍa Purāṇa

The earliest references to gemstones appear in the Vedas and Purāṇas. The Atharva Veda mentions gems as carriers of protective and healing energies. The Garuḍa Purāṇa (Ratna‑parīkṣā section) provides one of the earliest systematic classifications.
रत्नानि शुभदानि स्युः पापघ्नानि विशेषतः ।
येषां स्मरणमात्रेण भवेत् पुण्यप्रवृद्धिता ॥
ratnāni śubhadāni syuḥ pāpaghnāni viśeṣataḥ ।
yeṣāṃ smaraṇamātreṇa bhavet puṇyapravṛddhitā ॥
Gems are givers of auspiciousness and destroyers of misfortune and sins.
ratnāni jewels, precious things
śubhadāni bestowing auspiciousness, bringing good fortune
syuḥ are, may be
pāpaghnaṃ destroying sin, removing negativity
viśeṣataḥ especially, particularly
This Purāṇic foundation later crystallized into the technical discipline of Ratnaśāstra. However it created a debate about anukūla and pratikūla as (a) anukūla group advises gemstones only for temporal benevolent graha whereas (b) pratikūla advise gems for strengthening graha and removing their malevolent nature