In contrast to most insect guilds, gall‐forming insects are thought to reach highest diversity on sclerophyllous vegetation, such as Neotropical savannas and Mediterranean vegetation types. The water and nutrient stress endured by meristems of canopy trees in tall wet tropical rainforests may cause leaf sclerophylly. Hence, the upper canopies of such ecosystems may represent a suitable habitat for gall‐forming insects. At the San Lorenzo Protected Area, Panama, we estimated free‐feeding herbivory and gall densities within five sites in 2003 and 2004, by surveying leaves in vertical and horizontal transects. In each sample, we recorded leaf density (mature and young foliage), free‐feeding herbivore damage and number of galls, including the presence of live larvae, parasitoids or fungi. We surveyed 43 994 leaves, including 231 plants and 73 tree and liana species. We collected 5014 galls from 17 host‐plant species, including 32 gall species of which 59% were restricted to the canopy (overall infestation rates: 2.4% in 2003, 5.5% in 2004). In 2003, 16% of the galls were occupied by live larvae, against 5% in 2004. About 17–20% of leaves surveyed suffered from free‐feeding herbivory. Leaf sclerophylly increased significantly with sampling height, while free‐feeding herbivory decreased inversely. Conversely, the number of live galls collected in the canopy was 13–16 times higher than in the understorey, a pattern consistent across sites and years. Hence, the probability of gall survivorship increased with increasing leaf sclerophylly as death by fungi, parasitoids or accidental chewing were greater in the understorey. Increasing harsh ecophysiological conditions towards the upper canopy appear favourable to galls‐forming population maintenance, in support of the hypothesis of harsh environment. Hence, gall diversity and abundance in the upper canopy of tall tropical forests are perhaps among the highest in the world.