Dense emulsions, colloidal gels, microgels, and foams all display a solidlike behavior at rest characterized by a yield stress, above which the material flows like a liquid. Such a fluidization transition often consists of long-lasting transient flows that involve shear-banded velocity profiles. The characteristic time for full fluidization τf has been reported to decay as a power law of the shear rate γ and of the shear stress σ with respective exponents α and β. Strikingly, the ratio of these exponents was empirically observed to coincide with the exponent of the Herschel-Bulkley law that describes the steady-state flow behavior of these complex fluids. Here we introduce a continuum model, based on the minimization of a "free energy," that captures quantitatively all the salient features associated with such transient shear banding. More generally, our results provide a unified theoretical framework for describing the yielding transition and the steady-state flow properties of yield stress fluids.