noun
A yojijukugo referring collectively to all Shinto deities, both heavenly (天神) and earthly (地祇). Used in formal or religious contexts.
神社では天神地祇に祈りを捧げる。
At the shrine, we offer prayers to the gods of heaven and earth.
神々 is a general term for 'gods' or 'deities' without the specific heaven/earth distinction of 天神地祇.
Compound of 天神 (heavenly gods) and 地祇 (earthly gods). The exact historical origin is uncertain, but the phrase is rooted in Shinto cosmology.