In the flowering plants, an ovary is a part of the female reproductive organ of the flower or gynoecium. Specifically, it is the part of the pistil which holds the ovule(s) and is located above or below or at the point of connection with the base of the petals and sepals. The pistil may be made up of one carpel or of several fused carpels, and therefore the ovary can contain part of one carpel or parts of several fused carpels. Above the ovary is the style and the stigma, which is where the pollen lands and germinates to grow down through the style to the ovary, and, for each individual pollen grain, to fertilize one individual ovule. Some wind pollinated flowers have much reduced and modified ovaries.
Longitudinal section of female flower of a squash showing pistil (=ovary+style+stigma), ovules, and petals. The petals and sepals are above the ovary; such a flower is said to have an inferior ovary, or the flower is said to be epigynous.
Cross section of a tulip ovary
The orange is a simple fruit called a hesperidium. It is the mature ovary of a single orange blossom. Though it seems to have sections when cut open, all of these sections together come from a single ovary that develops into different layers.
The raspberry is an aggregate fruit. Each raspberry develops from one flower, but its flower has many ovaries that become the small circular drupes making up the raspberry. There is a seed in each drupe.
Gynoecium is most commonly used as a collective term for the parts of a flower that produce ovules and ultimately develop into the fruit and seeds. The gynoecium is the innermost whorl of a flower; it consists of pistils and is typically surrounded by the pollen-producing reproductive organs, the stamens, collectively called the androecium. The gynoecium is often referred to as the "female" portion of the flower, although rather than directly producing female gametes, the gynoecium produces megaspores, each of which develops into a female gametophyte which then produces egg cells.
Flower of Magnolia × wieseneri showing the many pistils making up the gynoecium in the middle of the flower
Hippeastrum flowers showing stamens, style and stigma
Hippeastrum stigmas and style
Moss plants with gynoecia, clusters of archegonia at the apex of each shoot.