Cosmology offers fascinating possibilities to test our understanding of gravity on large scales, and to probe the origin of structure in the Universe. Cosmology has evolved from a speculative branch of theoretical physics into precision science at the intersection of gravity, particle- and astrophysics. Despite all we have learned however, we still do not understand why the expansion of the Universe accelerates, and how the structure in the Universe originated. All structure in the universe, including galaxies, stars, planets, and ultimately, us, arose from the initial seed fluctuations under the action of gravity, so that these questions directly concern our origins. This project aims at using large-scale structure, the distribution of galaxy positions and their shapes, in a statistical way to shed light on these open questions. The goal of the project is to first, probe our theory of gravity, General Relativity, on cosmological scales. Second, it aims to shed light on the origin of the initial seed fluctuations out of which all structure in the Universe formed, by constraining the physics and energy scale of inflation. While seemingly unrelated, the main challenge in both research directions consists in understanding the nonlinear physics of structure formation, which is dominated by gravity on scales larger than a few Mpc. By making progress in this understanding, we can unlock a rich trove of information on fundamental physics from large-scale structure. The research goals are pursued on the three fronts of analytical theory, numerical simulations, and confrontation with data. With space missions, such as Planck and Euclid, as well as ground-based surveys delivering data sets of unprecedented size and quality at this very moment, the methods developed during the course of this project should deliver exciting new insights on gravity and inflation.