Quantum spin liquid is a disordered magnetic state with fractional spin excitations. Its clearest example is found in an exactly solved Kitaev honeycomb model where a spin flip fractionalizes into two types of anyons, quasiparticles that are neither fermions nor bosons: a pair of gauge fluxes and a Majorana fermion. Here we demonstrate this kind of fractionalization in the Kitaev paramagnetic state of the honeycomb magnet $alpha$-RuCl$_3$. The spin-excitation gap measured by nuclear magnetic resonance consists of the predicted Majorana fermion contribution following the cube of the applied magnetic field, and a finite zero-field contribution matching the predicted size of the gauge-flux gap. The observed fractionalization into gapped anyons survives in a broad range of temperatures and magnetic fields despite inevitable non-Kitaev interactions between the spins, which are predicted to drive the system towards a gapless ground state. The gapped character of both anyons is crucial for their potential application in topological quantum computing.