Community ecology can link habitat to disease via interactions among habitat, focal hosts, other hosts, their parasites, and predators. However, complicated food web interactions (i.e., trophic interactions among predators and their impacts on host density and diversity) often obscure the important pathways regulating disease. Here, we disentangle community drivers in a case study of planktonic disease, using a two-step approach. In step one, we tested univariate field patterns linking community interactions directly to two disease metrics. Density of focal hosts (Daphnia dentifera) was related to density but not prevalence of fungal (Metschnikowia bicuspidata) infections. Both disease metrics appeared to be driven by selective predators that cull infected hosts (fish, e.g., Lepomis macrochirus), sloppy predators that spread parasites while feeding (midges, Chaoborus punctipennis), and spore predators that reduce contact between focal hosts and parasites (other zooplankton, especially small-bodied Ceriodaphnia sp.). Host diversity also negatively correlated with disease, suggesting a dilution effect. However, several of these univariate patterns were initially misleading, due to confounding ecological links among habitat, predators, host density, and host diversity. In step two, path models uncovered and explained these misleading patterns, and grounded them in habitat structure (refuge size). First, rather than directly reducing infection prevalence, fish predation drove disease indirectly through changes in density of midges and frequency of small spore predators (which became more frequent in lakes with small refuges). Second, small spore predators drove the two disease metrics through fundamentally different pathways: they directly reduced infection prevalence, but indirectly reduced density of infected hosts by lowering density of focal hosts (likely via competition). Third, the univariate diversity-disease pattern (signaling a dilution effect) merely reflected the confounding direct effects of these small spore predators. Diversity per se had no effect on disease, after accounting for the links between small spore predators, diversity, and infection prevalence. In turn, these small spore predators were regulated by both size-selective fish predation and refuge size. Thus, path models not only explain each of these surprising results, but also trace their origins back to habitat structure.