A complete description is obtained for the subspaces of the Hardy space () that are invariant under the Volterra integral operator. We then show that this result can be applied to derive complete characterizations of such subspaces in a large class of Banach spaces of analytic functions in the unit disc containing the usual Bergman and Dirichlet spaces.