We study theoretically the effects of confinement on active polar gels such as the actin network of eukaryotic cells. Using generalized hydrodynamics equations derived for active gels, we predict, in the case of quasi one-dimensional geometry, a spontaneous flow transition from a homogeneously polarized immobile state for small thicknesses, to a perturbed flowing state for larger thicknesses. The transition is not driven by an external field but by the activity of the system. We suggest several possible experimental realizations.