The mantra in question is verse 1 of Rig Veda Book 2 Hymn 23:
ghaṇānāṃ tvā ghaṇapatiṃ havāmahe kaviṃ kavīnāmupamaśravastamam |
jyeṣṭharājaṃ brahmaṇāṃ brahmaṇas pata ā naḥ ṣṛṇvannūtibhiḥ sīda sādanam ||
We call thee, Lord and Leader of the heavenly hosts, the wise among the wise, the famousest of all, the King supreme of prayers, O Brahmaṇaspati: hear us with help; sit down in place of sacrifice.
Now at first glance, this might seem like a mantra to Ganesha, since it contains the word "ganapatim", and Ganapati is a name of Ganesha because he's the leader of Shiva's Ganas. And indeed, this is what has led a lot of people in modern times to recite the mantra as an Ahavana mantra to Ganesha. But this is actually a mantra to Brihaspati, as you can see in the Rig Veda Anukramani in my answer here and this excerpt from Shaunaka's Brihaddevata.
You see, the Sanskrit word "gana" has two meanings: it can refer to Shiva's Ganas, but it can also mean group or multitude. It is in the latter sense that Indra and Brihaspati are called Ganapati; they are leaders of the group of gods. In any case, it is clear from the rest of the hymn that it's referring to Brihaspati. In particular, here is what verse 18 says:
tava śriye vyajihīta parvato ghavāṃ ghotramudasṛjo yadaṅghiraḥ |
indreṇa yujā tamasā parīvṛtaṃ bṛhaspate nirapāmaubjo arṇavam ||
The mountain, for thy glory, cleft itself apart when, Aṅgiras! thou openedst the stall of kine.
Thou, O Bṛhaspati, with Indra for ally didst hurl down water-floods which gloom had compassed round.
Brihaspati is referred to as "aṅghiraḥ" because he's the son of the sage Angiras, as I discuss in my question here. So it's overwhelmingly clear that this is a hymn to Brihaspati.
Now as far as the seer goes, Wikipedia is right that it's Shaunaka's father Gritsamada; again see the Rig Veda Anukramani in my answer here. And it's true that the story of the Varada Vinayaka temple involves Gritsamada praying to Ganesha. But as far as I know, there's no scripture that connects the "gananam" verse to either Ganesha or to the story of the Varada Vinayaka temple. And considering that Shaunka was the son of Gritsamada, he would presumably have accurate information about who his father's hymns were addressed to, so Shaunaka's Brihaddevata is pretty conclusive here.
As far as Vedic mantras to Ganesha go, there are no mantras to Ganesha in the Samhitas or Brahmanas of the Vedas. This is for much the same reason that there are relatively few Vedic hymns to gods like Vishnu and Shiva. It is because, as I discuss in this answer, gods like Indra, Agni, Vayu, Surya, Chandra, etc. have more Vedic hymns dedicated to them, not because they're superior to Vishnu, Shiva, Ganesha, etc., but rather because they play a bigger role in the Soma Yagna.
But as I discuss in my question here, there is a mantra to Ganesha given in the Ganapati Atharvashirsha Upanishad, the famous Mahaganapati mantra. The seer of this mantra was the sage Ganaka, whom I suspect was an incarnation of Ganesha just like the sage Narayana was an incarnation of Vishnu, but I'm not sure about that which is why I asked this question. In any case, you can call the Mahaganapati mantra a "Vedic" mantra, but there's reason to believe that the Ganapati Atharvashirsha Upanishad is a later interpolation, as I discuss in this answer.
Or if you want to settle for Puranic mantras to Ganesha, the Narada Purana has a whole chapter full of them, for instance the famous Vakratunda mantra I discuss in my question here. (Of course, there's a possibility that the Narada Purana chapter is also an interpolation, because references to Ganesha in ancient Hindu scripture are few and far between, since he only became popular later on.)