In this paper, we introduce a new class of infinite population games, which we term graphon games. As a first contribution, we show that graphon games can be used to describe strategic behavior in heterogeneous populations of infinite size. We establish existence and uniqueness of graphon equilibria and derive general comparative statics results. As a second contribution, we study the equilibria of an ensemble of finite network games sampled from a stochastic network formation process (represented by the graphon). We provide explicit bounds on the distance of the equilibrium of any finite sampled network game and the corresponding graphon equilibrium in terms of the population size, and we characterize optimal interventions in sampled network games by a planner who knows the graphon but not the realization of the sampled network. Finally, as a third contribution, we relax the assumption that agents know the sampled network and establish a tight link between the graphon equilibrium and the Bayesian Nash equilibrium of an incomplete information network game sampled from the same graphon.