The acoustic resonance in a Helmholtz resonator excited by a low Mach number grazing flow is studied theoretically. The nonlinear numerical model is established by coupling the vortical motion at the cavity opening with the cavity acoustic mode through an explicit force balancing relation between the two sides of the opening. The vortical motion is modeled in the potential flow framework, in which the oscillating motion of the thin shear layer is described by an array of convected point vortices, and the unsteady vortex shedding is determined by the Kutta condition. The cavity acoustic mode is obtained from the one-dimensional acoustic propagation model, the time-domain equivalent of which is given by means of a broadband time-domain impedance model. The acoustic resistances due to radiation and viscous loss at the opening are also taken into account. The physical processes of the self-excited oscillations, at both resonance and off-resonance states, are simulated directly in the time domain. Results show that the shear layer exhibits a weak flapping motion at the off-resonance state, whereas it rolls up into large-scale vortex cores when resonances occur. Single and dual-vortex patterns are observed corresponding to the first and second hydrodynamic modes. The simulation also reveals different trajectories of the two vortices across the opening when the first and second hydrodynamic modes co-exist. The strong modulation of the shed vorticity by the acoustic feedback at the resonance state is demonstrated. The model overestimates the pressure pulsation amplitude by a factor 2, which is expected to be due to the turbulence of the flow which is not taken into account. The model neglects vortex shedding at the downstream and side edges of the cavity. This will also result in an overestimation of the pulsation amplitude.