We examine the propagation and flavor oscillations of neutrinos under the influence of gravitational waves (GWs) with an arbitrary polarization. We rederive the effective Hamiltonian for the system of three neutrino flavors using the perturbative approach. Then, using this result, we consider the evolution of neutrino flavors in stochastic GWs with a general energy density spectrum. The equation for the density matrix is obtained and solved analytically in the case of three neutrino flavors. As an application, we study the evolution of the flavor content of a neutrino beam emitted in a core-collapsing supernova. We obtain the analytical expressions for the contributions of GWs to the neutrino fluxes and for the damping decrement, which describes the attenuation of the fluxes to their asymptotic values. We find that the contribution to the evolution of neutrino fluxes from GWs, emitted by merging supermassive black holes, dominates over that from black holes with stellar masses. The implication of the obtained results for the measurement of astrophysical neutrinos with neutrino telescopes is discussed.