Many Velloziaceae flowers present conspicuous glands, whose taxonomic value has already been highlighted. However, until now, their micromorphology, anatomy and ultrastructure have not been investigated, nor have the natures and possible functions of their exudates. Our aim was to investigate distribution, ontogenesis, structure, and secretion mechanisms of glands of Barbacenia flava and Vellozia intermedia and to discuss their possible ecological functions. Samples were prepared according to standard methods for investigations of plant anatomy, scanning electron microscopy, and transmission electron microscopy. Histochemical tests were performed, and focal field observations were made in the study site. The capitate stalked glands on the pedicel, tepals and hypanthium are covered by a sticky secretion that is released in the gland head through the outer periclinal cell walls and cuticle. Secretions are produced in the epidermal and subepidermal cells that contain structural components typical of mixed, mainly lipophilic secretions. Bacteria were found inside the oil-resin gland cells of both species. The Meliponina bees Trigona spinipes and Tetragonisca angustula were observed collecting resin from both species, but were not involved in pollination. Our observations clearly indicate that flower glands of B. flava and V. intermedia are oil-resin secreting and remain active in secretion from very young buds, through to immature fruit. New, smaller glands replace senescent glands by divisions near the base of the original stalk cells. Oil-resin glands have a number of different, but important functions, including the interaction with Meliponina bees, protection against water loss and high temperatures by ultraviolet screening, and anti-desiccant properties.