  We present early-time, hour-to-day cadence spectroscopy of the nearby type II
supernova (SN II) 2024ggi, which was discovered at a phase when the SN shock
just emerged from the red-supergiant (RSG) progenitor star. Over the first few
days after the first light, SN 2024ggi exhibited prominent narrow emission
lines formed through intense and persistent photoionization of the nearby
circumstellar material (CSM). In the first 63 hours, spectral lines of He, C,
N, and O revealed a rapid rise in ionization, as a result of the progressive
sweeping-up of the CSM by the shock. The duration of the IIn-like spectra
indicates a dense and relatively confined CSM distribution extending up to
$\sim 4 \times 10^{14}$ cm. Spectral modeling reveals a CSM mass loss rate at
this region exceeding $5 \times 10^{-3}{\rm M}_{\odot}$ yr$^{-1}$ is required
to reproduce low-ionization emissions, which dramatically exceeds that of an
RSG. Analyzing H$\alpha$ emission shift implies the velocity of the unshocked
outer CSM to be between 20 and 40 km s$^{-1}$, matching the typical wind
velocity of an RSG. The differences between the inner and outer layers of the
CSM and an RSG progenitor highlight a complex mass loss history before the
explosion of SN 2024ggi.
