A full understanding of high-mass star formation requires the study of one of the most elusive components of the energy balance in the interstellar medium: magnetic fields. We report ALMA 1.2 mm, high-resolution (700 au) dust polarization and molecular line observations of the rotating hot molecular core embedded in the high-mass star-forming region IRAS 18089-1732. The dust continuum emission and magnetic field morphology present spiral-like features resembling a whirlpool. The velocity field traced by the H13CO+ (J=3-2) transition line reveals a complex structure with spiral filaments that are likely infalling and rotating, dragging the field with them. We have modeled the magnetic field and find that the best model corresponds to a weakly magnetized core with a mass-to-magnetic-flux ratio (lambda) of 8.38. The modeled magnetic field is dominated by a poloidal component, but with an important contribution from the toroidal component that has a magnitude of 30% of the poloidal component. Using the Davis-Chandrasekhar-Fermi method, we estimate a magnetic field strength of 3.5 mG. At the spatial scales accessible to ALMA, an analysis of the energy balance of the system indicates that gravity overwhelms turbulence, rotation, and the magnetic field. We show that high-mass star formation can occur in weakly magnetized environments, with gravity taking the dominant role.