I use the gas-phase chemical abundance of star-forming galaxies to understand how the environment influences the multi-phase gas cycle as a galaxy falls into the cluster potential. Using observations with DEIMOS/Keck, I find a cluster-scale gradient in the metallicity of star-forming galaxies and present it as a new angle to identify physical processes driving the chemical enrichment of cluster galaxies. I use a semi-analytic model of ram pressure stripping to prove that removal of low-metallicity gas is not sufficient to reproduce the metallicity gradient. Using IllustrisTNG cosmological simulations, I find systematic signature of "chemical pre-processing" of infalling galaxies. I predict that the inflow of enriched gas (pre-enrichment) is driving the chemical evolution in the overdense environment. In my Ph.D. dissertation, I combine observations, theoretical models, and cosmological simulations to identify drivers of the chemical evolution in the cluster environment.