We use 3D simulations to demonstrate that high-quality ultrarelativistic electron bunches can be generated on reflection of a twisted laser beam off a plasma mirror. The unique topology of the beam with a twist index |l|=1 creates an accelerating structure dominated by longitudinal laser electric and magnetic fields in the near-axis region. We show that the magnetic field is essential for creating a train of dense monoenergetic bunches. For a 6.8 PW laser, the energy reaches 1.6GeV with a spread of 5.5%. The bunch duration is 320 as, its charge is 60pC, and density is ∼10^{27} m^{-3}. The results are confirmed by an analytical model for the electron energy gain. These results enable development of novel laser-driven accelerators at multi-PW laser facilities.