Changes in plant secondary metabolism due to insect galls are one of the frontiers in knowledge of plant-insect interactions, especially concerning volatile organic compounds (VOCs). Here we studied the in vivo VOCs released from healthy apical branches of Haplopappus foliosus DC. (Asteraceae) and compared these volatiles to the VOCs obtained from apical bud galls produced in this host plant when attacked by the gall midge Haplopappusmyiia gregaria (Cecidomyiidae). We field-collected VOCs by dynamic headspace and identified them by gas chromatography coupled to mass spectrometry. We found changes in the relative proportions of different classes of VOC in apical branches vs. apical bud galls. H. foliosus VOCs had mainly monoterpene hydrocarbons such as p-cymene, a recognized herbivore deterrent. We also found oxygenated monoterpenes and sesquiterpenes in the H. foliosus volatile mixture. H. foliosus modifies its fragrance composition when parasitized by gall midges, showing an increased proportion of some monoterpene hydrocarbons, e.g. limonene and camphene, while others such as α-thujene, p-cymene and γ-terpinene were down-expressed in apical bud gall VOCs. We discuss these results considering gall signaling and chemical ecology hypotheses, including the potential role of plant defenses as well as gall midge-derived modification for host plant VOCs, and comment on the ecological relevance of our findings.