Unfinished Tales may shed some light. In the chapter on the Istari, we hear a slightly different telling of this story:
[A]nd one came last who seemed the least, less tall than the others, and in looks more aged, grey-haired and grey-clad, and leaning on a staff. But Círdan from their first meeting at the Grey Havens divined in him the greatest spirit and the wisest; and he welcomed him with reverence, and he gave to his keeping the Third Ring, Narya the Red.
'For,' said he, 'great labours and perils lie before you, and lest your task prove too great and wearisome, take this Ring for your aid and comfort. It was entrusted to me only to keep secret, and here upon the West-shores it is idle; but I deem that in days ere long to come it should be in nobler hands than mine, that may wield it for the kindling of all hearts to courage.'
Basically, Círdan knows that Narya isn't doing any good in the Grey Havens, and he decides that Gandalf is likely to do the most good with it.
How does he know this? It's unclear. We've seen evidence that some elves have a limited ability to see the future, especially elves with Rings of Power, so it may be that Círdan had a glimpse of things to come.
Another possibility is that Círdan, who has been around for a long time and presumably has gotten pretty good at reading people, saw Gandalf's spirit. The same chapter I quoted earlier goes on to describe him:
Warm and eager was his spirit (and it was enhanced by the ring Narya), for he was the Enemy of Sauron, opposing the fire that devours and wastes with the fire that kindles, and succours in wanhope and distress; but his joy, and his swift wrath, were veiled in garments grey as ash, so that only those that knew him well glimpsed the fire that was within.
It's a bit of an assumption, but not too much of a stretch to say that Círdan may have seen a glimpse of this spirit in Gandalf on their first meeting, and decided that Narya would enhance this natural fire better in him than in the others. We don't know much about the Blue Wizards, but not many are going to call either Saruman or Radagast "firey."