To any non-trivial embedding of sl(2) in a (super) Lie algebra, one can associate an extension of the Virasoro algebra. We realize the extended Virasoro algebra in terms of a WZW model in which a chiral, solvable group is gauged, the gauge group being determined by the sl(2) embedding. The resulting BRST cohomology is computed and the field content of the extended Virasoro algebra is determined. The closure of the extended Virasoro algebra is shown. Applications such as the quantum Miura transformation and the effective action of the associated extended gravity theory are discussed.