A defect of the reproductive system that results in lack of function of the gonads (ovaries or testes).