The arrest of attractive particles into out-of-equilibrium structures known as gelation is central to biophysics, material science and food and cosmetic applications, but a complete understanding is lacking. In particular for intermediate particle density and attraction, the structure formation process remains unclear. Here, we show that the gelation of short-range attractive particles is governed by a nonequilibrium percolation process. We combine experiments on critical Casimir colloidal suspensions, simulations, and analytic modelling with a master kinetic equation to show that cluster sizes and correlation lengths diverge with exponents ∼ 1.6 and 0.8, respectively, consistent with percolation theory, while detailed balance in the particle attachment and detachment processes is broken. Cluster masses exhibit power-law distributions with exponents −3/2 and −5/2 before and after percolation, as predicted by solutions to the master kinetic equation. These results revealing a nonequilibrium continuous phase transition unify the structural arrest and yielding into related frameworks.