We develop modulation theory for undular bores (dispersive shock waves) in the framework of the Gardner, or extended Korteweg--de Vries, equation, which is a generic mathematical model for weakly nonlinear and weakly dispersive wave propagation, when effects of higher order nonlinearity become important. Using a reduced version of the finite-gap integration method we derive the Gardner-Whitham modulation system in a Riemann invariant form and show that it can be mapped onto the well-known modulation system for the Korteweg--de Vries equation. The transformation between the two counterpart modulation systems is, however, not invertible. As a result, the study of the resolution of an initial discontinuity for the Gardner equation reveals a rich phenomenology of solutions which, along with the KdV type simple undular bores, include nonlinear trigonometric bores, solibores, rarefaction waves and composite solutions representing various combinations of the above structures. We construct full parametric maps of such solutions for both signs of the cubic nonlinear term in the Gardner equation. Our classification is supported by numerical simulations.