The classical Hodgkin-Huxley (HH) model neglects the time-dependence of ion concentrations in spiking dynamics. The dynamics is therefore limited to a time scale of milliseconds, which is determined by the membrane capacitance multiplied by the resistance of the ion channels, and by the gating time constants. We study slow dynamics in an extended HH framework that includes time-dependent ion concentrations, pumps, and buffers. Fluxes across the neuronal membrane change intra- and extracellular ion concentrations, whereby the latter can also change through contact to reservoirs in the surroundings. Ion gain and loss of the system is identified as a bifurcation parameter whose essential importance was not realized in earlier studies. Our systematic study of the bifurcation structure and thus the phase space structure helps to understand activation and inhibition of a new excitability in ion homeostasis which emerges in such extended models. Also modulatory mechanisms that regulate the spiking rate can be explained by bifurcations. The dynamics on three distinct slow times scales is determined by the cell volume-to-surface-area ratio and the membrane permeability (seconds), the buffer time constants (tens of seconds), and the slower backward buffering (minutes to hours). The modulatory dynamics and the newly emerging excitable dynamics corresponds to pathological conditions observed in epileptiform burst activity, and spreading depression in migraine aura and stroke, respectively. 