They were contemporaries. Kepler lived from 1571 to 1630, and Galileo lived from 1564 to 1642. The former's life span was contained in that of the latter.
So, did Galileo hear of Kepler's work and give some comment?
History of Science and Mathematics Stack Exchange is a question and answer site for people interested in the history and origins of science and mathematics. It only takes a minute to sign up.Sign up to join this community
Yes, Galileo knowed Kepler's, as well as Tycho's, works.
There is an extant copy of Tycho's Progymnasmata with Galileo's annotations, and we have an annotation from Galileo on Kepler's De stella nova: the main interest showed by Galileo's annotations regards novae and comets.
Kepler published two booklets in defence of Galileo, after the pubblication in 1610 of Sidereus Nuncius:
followed the same year by :
The two corresponded and were "in touch", although they did not meet.
And yes, Galileo gave comments on Kepler.
There are some references to Kepler in Galileo's Dialogue, ending with a critical judgement.
The context is Galileo's "master argument" for the rotation of Earth: his pure "cinematical explanation of the tides, without need to "occult" attractions:
[ Giornata quarta, page 486 ] Ma tra tutti gli uomini grandi che sopra tal mirabile effetto di natura hanno filosofato, piú mi meraviglio del Keplero che di altri, il quale, d’ingegno libero ed acuto, e che aveva in mano i moti attribuiti alla Terra, abbia poi dato orecchio ed assenso a predominii della Luna sopra l’acqua, ed a proprietà occulte, e simili fanciullezze.
But among all the great men who have philosophized about this remarkable effect, I am more astonished at Kepler than at any other. Despite his open and acute mind, and though he has at his fingertips the motions attributed to the earth, he has nevertheless lent his ear and his assent to the moon’s dominion over the waters, to occult properties, and to such puerilities [S.Drake's translation].
Galileo did not publish any opinion on Kepler's work, though they corresponded with Kepler. Why this is so, subject to speculation. See, for example Koestler, Sleepwalkers (this author is unfriendly to Galileo). One possible reason was that Galileo simply did not appreciate enough Kepler's contributions, which was mostly mathematical, and very different in the spirit from Galileo's principal interests.