Some say Sun is the main deity prayed by gayatri . But puranas say , Sun is troubled by Mandeh Rakshasas during sandhya . Valkhilya rishis give gayatri arghya during sandhya and mandeh gets killed giving relief to the Sun. THe mantra which gives relief to Sun how can it be guided by Sun.Sun himself is protected by this mantra. So sun cannot be prime deity of Gayatri . Its Narayana in the Sun who is meditated as gayatri. Sun is his pratima [idol] ,just as idol in the temple is not god ,but God resides in it ,similraly sun is not gayatri , Gayatri resides in Sun.
note : at every instant some place on the earth is experiencing the sunset or sunrise , thus Mandeh trouble Surya all the while and Valkhilya rishis who adorn the wheel of the Chariot of Sun are ever engaged in this arghya dana. Gayatri protects Sun all the time.