A. Beurling used the tools of functional analysis to solve the problem of characterizing the shift-invariant subspaces of the Hardy space \(H^{2},\) thus establishing the Beurling theorem. In this paper, we extend the Beurling invariant subspace theorem to the weighted Lebesgue and Hardy spaces for a larger class of symmetric gauge norms (e.g., Orlicz, Lorentz, Marcinkiewicz norms), beyond classical \(L^p\) -norms. A crucial tool employed in the proof of our main result is a new density theorem for the Lebesgue spaces \(L^\alpha _\omega (\mathbb {T}).\) This theorem serves as a bridge connecting the invariant subspaces under the weak*-topology and the \(\alpha _\omega \) -topology. As an application, we characterize the outer functions as cyclic vectors and discuss the inner–outer factorization theorem on the weighted Hardy spaces \(H^\alpha _\omega (\mathbb {T}).\)