The reproductive organ (gonads) in female animals. In vertebrates, the ovary contains two functional parts: the ovarian follicle for the production of female germ cells (oogenesis); and the endocrine cells (granulosa cells; theca cells; and luteal cells) for the production of estrogens and progesterone.