In recent years, precise cosmological measurements have provided strong evidence for new physics beyond the Standard Model, occurring both in the very early universe and also today. In the near future, large-scale galaxy surveys will open another window on many different areas of physics, including tests of gravity, probes of dark energy, and cosmic inflation. However, interpreting galaxy surveys presents new challenges, because galaxies are sensitive to astrophysics that are unimportant for the cosmic microwave background. I will discuss how galaxies may be used to study cosmology, and will argue that the messy astrophysics in galaxies actually offers entirely new probes of fundamental physics. I will illustrate this with 3 examples, related to inflation, neutrino masses, and the properties of dark matter.