Heteropolymer gels can be engineered to release specific molecules into or absorb molecules from a surrounding solution. This remarkable ability is the basis for developing gel applications in extensive areas such as drug delivery, waste cleanup, and catalysis. Furthermore, gels are a model system for proteins, many of whose properties they can be created to mimic. A key aspect of gels is their volume phase transition, which provides a macroscopic mechanism for effecting microscopic changes. The phase transition allows one to control the gel's affinity for target molecules through tiny changes in the solution temperature, salt concentration, pH, or the like. We summarize recent experiments that systematically characterize the gel affinity as a function of adsorbing monomer concentration, solution salt concentration, and cross-linker concentration, on both sides of the phase transition. We provide a physical theory that explains the results and discuss enhancements via imprinting.