The two primary hormones responsible for muscle gain are Testosterone and Growth Hormone.
Healthy males and females reach peak testosterone and growth hormone levels at age 20-25, steadily decrease to 50% by age 40 and level off to 25% of peak levels by age 50. Obviously, higher levels of these hormones with the correct resistance training and nutritional protocol significantly improve your chances of gaining muscle.