We use neutron scattering to study magnetic excitations near the antiferromagnetic wave vector in the underdoped single-layer cuprate HgBa2CuO4+δ (superconducting transition temperature Tc≈88 K, pseudogap temperature T∗≈220 K). The response is distinctly enhanced below T∗ and exhibits a Y-shaped dispersion in the pseudogap state, whereas the superconducting state features an X-shaped (hourglass) dispersion and a further resonancelike enhancement. A large spin gap of about 40 meV is observed in both states. This phenomenology is reminiscent of that exhibited by bilayer cuprates. The resonance spectral weight, irrespective of doping and compound, scales linearly with the putative binding energy of a spin exciton described by an itinerant-spin formalism.