Variation in species richness across environmental gradients may be associated with an expanded volume or increased packing of ecological niche space. However, the relative importance of these alternative scenarios remains unknown, largely because standardized information on functional traits and their ecological relevance is lacking for major diversity gradients. Here, we combine data on morphological and ecological traits for 523 species of passerine birds distributed across an Andes-to-Amazon elevation gradient. We show that morphological traits capture substantial variation in species dietary (75%) and foraging niches (60%) when multiple independent trait dimensions are considered. Having established these relationships, we show that the 14-fold increase in species richness towards the lowlands is associated with both an increased volume and density of functional trait space. However, we find that increases in volume contribute little to changes in richness, with most (78%) lowland species occurring within the range of trait space occupied at high elevations. Taken together, our results suggest that high species richness is mainly associated with a denser occupation of functional trait space, implying an increased specialization or overlap of ecological niches, and supporting the view that niche packing is the dominant trend underlying gradients of increasing biodiversity towards the lowland tropics.