Infectious diseases have profound effects on life, both in nature and agriculture. However, a quantitative genetic theory of the host population for the endemic prevalence of infectious diseases is almost entirely lacking. While several studies have demonstrated the relevance of transmission of infections for heritable variation and response to selection, current quantitative genetics ignores transmission. Thus, we lack concepts of breeding value and heritable variation for endemic prevalence, and poorly understand response of endemic prevalence to selection. Here, we integrate quantitative genetics and epidemiology, and propose a quantitative genetic theory for the basic reproduction number R0 and for the endemic prevalence of an infection. We first identify the genetic factors that determine the prevalence. Subsequently, we investigate the population-level consequences of individual genetic variation, for both R0 and the endemic prevalence. Next, we present expressions for the breeding value and heritable variation, for endemic prevalence and individual binary disease status, and show that these depend strongly on the prevalence. Results show that heritable variation for endemic prevalence is substantially greater than currently believed, and increases strongly when prevalence decreases, while heritability of disease status approaches zero. As a consequence, response of the endemic prevalence to selection for lower disease status accelerates considerably when prevalence decreases, in contrast to classical predictions. Finally, we show that most heritable variation for the endemic prevalence is hidden in indirect genetic effects, suggesting a key role for kin-group selection in the evolutionary history of current populations and for genetic improvement in animals and plants.