In Ramayana it was mentioned that at dawn, Sri Rama and Lakshmana recited the Supreme Hymn at the behest of Sage Viswamitra.
तस्य ऋषेः परम उदारम् वचः श्रुत्वा नृप नरोत्तमौ | स्नात्वा कृत उदकौ
वीरौ जेपतुः परमम् जपम् || १-२३-३
On hearing the benign words of the sage those valorous and best ones
among men got up, bathed,and on offering water oblation they mediated upon the supreme hymn.
Though it was mentioned as Supreme Hymn, we can take it as Gayatri mantra, as it was recited at twilight.
Vishvamitra was credited with authoring the 3rd Mandala of Rigveda, in which the Gayatri mantra was included.
However, it is not clearly mentioned whether this Viswamitra was the same Viswamitra, who was mentioned in the Bala Kanda of Ramayana.
Now, the question part - Why is Gayatri Mantra so important?
The Gāyatrī is dedicated to Savitr, a Vedic Sun deity. This is one aspect. That was why recitation of this mantra used to be done by facing the Sun.
Another aspect is that in Vedic era, the inner meaning of the epithets like Indra, Agni, Surya, etc, used to denote the various forms of one Almighty God.
If we delve deep into SPIRITUALITY, we can find mention of experiencing ABSOLUTE BLISS or limitless light in the final stages, by sages like Sri Ramana Maharshi.
So the inner meaning of Sun or Surya is ABSOLUTE BLISS or limitless light, if properly understood.
The recitation of Savitr mantra, which was formed in Gayatri metre in proper way will lead to ABSOLUTE BLISS or limitless light.
That is why it is SUPREME matra, as described by Sage Valmiki in Ramayana.