Roughly half of the quasiperiodic eruption (QPE) sources in galactic nuclei exhibit a remarkably regular alternating “long-short” pattern of recurrence times between consecutive flares. We show that a main-sequence star (brought into the nucleus as an extreme mass-ratio inspiral; EMRI) that passes twice per orbit through the accretion disk of the supermassive black hole (SMBH) on a mildly eccentric inclined orbit, each time shocking and ejecting optically thick gas clouds above and below the midplane, naturally reproduces observed properties of QPE flares. Inefficient photon production in the ejecta renders the QPE emission much harder than the blackbody temperature, enabling the flares to stick out from the softer quiescent disk spectrum. Destruction of the star via mass ablation limits the QPE lifetime to decades, precluding a long-lived AGN as the gaseous disk. By contrast, a tidal disruption event (TDE) naturally provides a transient gaseous disk on the requisite radial scale, with a rate exceeding the EMRI inward migration rate, suggesting that many TDEs should host a QPE. This picture is consistent with the X-ray TDE observed several years prior to the QPE appearance from GSN 069. Remarkably, a second TDE-like flare was observed from this event, starting immediately after detectable QPE activity ceased; this event could plausibly result from the (partial or complete) destruction of the QPE-generating star triggered by runaway mass loss, though other explanations cannot be excluded. Our model can also be applied to black hole–disk collisions, such as those invoked in the context of the candidate SMBH binary OJ 287.