Glasses and gels are the two dynamically arrested, disordered states of matter. Despite their importance, their similarities and differences remain elusive, especially at high density, where until now it has been impossible to distinguish them. We identify dynamical and structural signatures which distinguish the gel and glass transitions in a colloidal model system of hard and "sticky" spheres. It has been suggested that "spinodal" gelation is initiated by gas-liquid viscoelastic phase separation to a bicontinuous network and the resulting densification leads to vitrification of the colloid-rich phase, but whether this phase has sufficient density for arrest is unclear [M. A. Miller and D. Frenkel, Phys. Rev. Lett. 90, 135702 (2003) and P. J. Lu et al., Nature 435, 499-504 (2008)]. Moreover alternative mechanisms for arrest involving percolation have been proposed [A. P. R. Eberle et al., Phys. Rev. Lett. 106, 105704 (2011)]. Here we resolve these outstanding questions, beginning by determining the phase diagram. This, along with demonstrating that percolation plays no role in controlling the dynamics of our system, enables us to confirm spinodal decomposition as the mechanism for gelation. We are then able to show that gels can be formed even at much higher densities than previously supposed, at least to a volume fraction of • = 0.59. Far from being networks, these gels apparently resemble glasses but are still clearly distinguished by the "discontinuous" nature of the transition and the resulting rapid solidification, which leads to the formation of inhomogeneous (with small voids) and far-from-equilibrium local structures. This is markedly different from the glass transition, whose continuous nature leads to the formation of homogeneous and locally equilibrated structures. We further reveal that the onset of the attractive glass transition in the form of a supercooled liquid is in fact interrupted by gelation. Our findings provide a general thermodynamic, dynamic, and structural basis upon which we can distinguish gelation from vitrification.