A hormone that stimulates the production of sperm or eggs.