While significant progress has been made in galaxy formation studies in the past few decades, a self-consistent explanation for the diffuse gaseous halos (also known as the circumgalactic medium; CGM) surrounding galaxies still eludes us. Particularly puzzling is the high incidence of cool (T~10^4 K) gas in the gaseous halos of massive quiescent galaxies, which is at odds with their lack of recent star-formation activity and the theoretical expectation that their diffuse baryons are predominantly hot. Characterizing the physical properties of the gaseous halos of massive quiescent galaxies is necessary to build an empirical understanding of the coevolution of galaxies and gas over cosmic time. This dissertation is based on a series of observational studies that investigate the physical characteristics, origin, and fate of the gaseous halos of intermediate-redshift (z~0.5) massive quiescent galaxies with stellar masses M_star > 10^11 M_sun, using precision analysis of QSO absorption-line spectroscopy. Chapter 2 investigates the properties of cool gas in the vicinity (projected distances d<20 kpc) of three massive quiescent lensing galaxies at z = 0.4-0.7. Whenever cool gas is detected, it exhibits a high and super-solar Fe/alpha abundance ratio, indicating that the inner gaseous halos of massive quiescent galaxies have been highly enriched by Type Ia supernovae (SNe Ia). Chapter 3 examines how chemical compositions (specifically the Fe/alpha ratio) in the CGM depends on both distance from and star-formation history of the galaxy, using a sample of intermediate-redshift quiescent and star-forming galaxies probed by background QSO sightlines. The data show that passive galaxies exhibit higher Fe/alpha than star-forming galaxies at all radii in their CGM. Furthermore, the Fe/alpha ratio in the gaseous halos of passive galaxies declines with increasing distance. While super-solar Fe/alpha gas is common in the inner halo (d<50 kpc), at larger distances (d>100 kpc) the gas is predominantly Fe-poor, consistent with gas originating from the intergalactic medium (IGM). These observations indicate that feedback by SNe Ia is relatively localized to the inner halos of passive galaxies. Chapter 4 presents the first detection of extended neutral hydrogen (HI) gas in the interstellar medium (ISM) of a massive elliptical galaxy beyond the local universe (z=0.4), which subsequently allows the total mass of the cool ISM to be estimated. The mass of cool ISM is approximately 5% the inferred mass of the hot ISM (T>10^6 K) in this galaxy, which implies the presence of an effective heating source in the ISM. Chapter 5 presents a systematic investigation of the physical conditions and elemental abundances in the gaseous halos of massive elliptical galaxies at z~0.5. Based on the results of a detailed ionization analysis of the observed gas, Chapter 5 finds that the CGM of massive elliptical galaxies is a multi-phase mixture of gasses with different physical origins and poor chemical mixing. Furthermore, the typical massive elliptical galaxy at z~0.5 is surrounded by a significant mass of cool gas in its gaseous halo, M_cool ~ 10^10 M_sun, which is comparable in mass to the halo gas reservoirs of L* star-forming galaxies. At the same time, the observed radial velocity dispersion of the cool gas clumps is sub-virial, which implies that the cool clouds and are subjected to dissipative interactions which cause them to fall toward the galaxy. Chapter 6 moves to the high-redshift Universe (z~2.8) to investigate the gaseous environment of three Ly-alpha emitters (LAEs), the high-redshift precursors of today's luminous galaxies. Combined evidence from the observed elemental abundances, kinematics, and projected spatial alignment of the observed gas relative to the LAEs suggests the presence of an accretion stream of low-metallicity gas in the IGM which are likely feeding the growth of these galaxies. This dissertation concludes in Chapter 7 with a discussion of the significant insights this work has provided into the gaseous environment of massive quiescent galaxies, the implications on future research, and work in progress investigating the multi-phase nature of the ISM of massive quiescent galaxies.