Nucleoli have viscoelastic gel-like condensate dynamics that are not well represented in vitro. Nucleoli models, such as those formed by nucleophosmin 1 (NPM1) and ribosomal RNA (rRNA), exhibit condensate dynamics orders of magnitude faster than in vivo nucleoli. Here we show that an interplay between magnesium ions (Mg2+) and ATP governs rRNA dynamics, and this ultimately shapes the physical state of these condensates. Using quantitative fluorescence microscopy, we demonstrate that increased RNA compaction occurs in the condensates at high Mg2+ concentrations, contributing to the slowed RNA dynamics. At Mg2+ concentrations above 7 mM, rRNA is fully arrested and the condensates are gels. Below the critical gel point, NPM1-rRNA droplets age in a temperature-dependent manner, suggesting that condensates are viscoelastic materials, undergoing maturation driven by weak multivalent interactions. ATP addition reverses the dynamic arrest of rRNA, resulting in liquefaction of these gel-like structures. Surprisingly, ATP and Mg2+ both act to increase partitioning of NPM1-proteins as well as rRNA, which influences the partitioning of small client molecules. By contrast, larger ribosomes form a halo around NPM1-rRNA coacervates when Mg2+ concentrations are higher than ATP concentrations. Within cells, ATP levels fluctuate due to biomolecular reactions, and we demonstrate that a dissipative enzymatic reaction can control the biophysical properties of in vitro condensates through depletion of ATP. This enzymatic ATP depletion also reverses the formation of the ribosome halos. Our results illustrate how cells, by changing local ATP concentrations, may regulate the state and client partitioning of RNA-containing condensates such as the nucleolus.