Be stars are a class of stars more massive than the Sun which are surrounded by a disk of material ejected by the star itself. A subset of these, typified by the naked-eye star gamma Cas (located at the center of the W asterism of the Cassiopeia constellation), exhibit unusually bright and hard X-ray emission, the origin of which has remained debated for over five decades. Here we report on a high-resolution X-ray spectroscopic monitoring of gamma Cas obtained with the Resolve instrument aboard XRISM. X-ray lines from the ultra-hot plasma as well as fluorescence in cooler material exhibit Doppler shifts consistent with orbital motion, not of the Be star, but of its low-mass companion. This provides direct evidence that the X-ray emission arises from accretion onto a white dwarf. The modest line broadening further indicates fluorescence occurring on the white dwarf surface and excludes X-ray generation in the inner parts of an accretion disk. Our findings identify gamma Cas and its analogs as the previously elusive (but long predicted) class of Be + white dwarf binaries. The identification of the true nature of gamma Cas and its analogs, which represent about 10% of early-type Be stars, offers a key input for population synthesis models of massive binary evolution.