Dense granular materials and other particle aggregates transmit stress in a manner that belies their microstructural disorder. A subset of the particle contact network is strikingly coherent, wherein contacts are aligned nearly linearly and transmit large forces. Important material properties are associated with these force chains, but their origin has remained a puzzle. We classify subnetworks by their linear connectivity, and show the emergence of a percolation transition at a critical linearity at which the network is sparse, coherent, and contains the force chains. The subnetwork at critical linearity closely reflects the macroscopic stress and explains distinctive features of granular mechanics.