Nanoscale or colloidal particles are important in many realms of science and technology. They can dramatically change the properties of materials, imparting solid-like behaviour to a wide variety of complex fluids. This behaviour arises when particles aggregate to form mesoscopic clusters and networks. The essential component leading to aggregation is an interparticle attraction, which can be generated by many physical and chemical mechanisms. In the limit of irreversible aggregation, infinitely strong interparticle bonds lead to diffusion-limited cluster aggregation (DLCA). This is understood as a purely kinetic phenomenon that can form solid-like gels at arbitrarily low particle volume fraction. Far more important technologically are systems with weaker attractions, where gel formation requires higher volume fractions. Numerous scenarios for gelation have been proposed, including DLCA, kinetic or dynamic arrest, phase separation, percolation and jamming. No consensus has emerged and, despite its ubiquity and significance, gelation is far from understood-even the location of the gelation phase boundary is not agreed on. Here we report experiments showing that gelation of spherical particles with isotropic, short-range attractions is initiated by spinodal decomposition; this thermodynamic instability triggers the formation of density fluctuations, leading to spanning clusters that dynamically arrest to create a gel. This simple picture of gelation does not depend on microscopic system-specific details, and should thus apply broadly to any particle system with short-range attractions. Our results suggest that gelation-often considered a purely kinetic phenomenon-is in fact a direct consequence of equilibrium liquid-gas phase separation. Without exception, we observe gelation in all of our samples predicted by theory and simulation to phase-separate; this suggests that it is phase separation, not percolation, that corresponds to gelation in models for attractive spheres.