Yes, a baby's Hac is valid and the parent earns reward — use a carrier instead of a stroller, plan for cooler hours, and bring all supplies.
Yes, performing Hac with a baby is permissible. A woman brought her child to Hz. Peygamber (sallallahu aleyhi ve sellem) and asked: 'Is there Hac for this one?' He replied: 'Yes, and you will have the reward' (Muslim). The Hac performed on behalf of a child is valid and earns reward for the parent, though the child will still need to perform their own farz Hac after reaching puberty.
Practical considerations are significant: the extreme heat and massive crowds during Hac present real challenges with an infant. Use a front-facing baby carrier rather than a stroller for tavaf and sa'i, as strollers are nearly impossible to navigate in peak crowds. Bring ample supplies — diapers, formula/food, medications, sun protection, and a lightweight blanket. Plan your rituals during the early morning or late evening when temperatures are lower and crowds are thinner. Keep the baby hydrated frequently. Diaper changes and breastfeeding breaks may require stepping away from the ritual temporarily — this is completely permissible. Ensure your Hac group is aware you have an infant so they can provide appropriate support.
Source: Sahih Muslim, Kitab al-Hac; Ibn Qudamah, al-Mughni