Theory predicts that intraspecific genetic variation can increase the complexity of an ecological network. To date, however, we are lacking empirical knowledge of the extent to which genetic variation determines the assembly of ecological networks, as well as how the gain or loss of genetic variation will affect network structure. To address this knowledge gap, we used a common garden experiment to quantify the extent to which heritable trait variation in a host plant determines the assembly of its associated insect food web (network of trophic interactions). We then used a resampling procedure to simulate the additive effects of genetic variation on overall food-web complexity. We found that trait variation among host-plant genotypes was associated with resistance to insect herbivores, which indirectly affected interactions between herbivores and their insect parasitoids. Direct and indirect genetic effects resulted in distinct compositions of trophic interactions associated with each host-plant genotype. Moreover, our simulations suggest that food-web complexity would increase by 20% over the range of genetic variation in the experimental population of host plants. Taken together, our results indicate that intraspecific genetic variation can play a key role in structuring ecological networks, which may in turn affect network persistence.