Modifications to gravity can provide attractive alternatives to the dark components of the standard model of cosmology. These modifications to general relativity (GR) must be hidden at small scales where theory is well tested, and so one naturally looks to the large scales in order to detect any deviations from GR. One particularly promising avenue in testing gravity at cosmological scales is within the anisotropy of galaxy clustering in redshift space. This thesis presents a framework for consistently constructing large scale structure observables in redshift space for gravitational theories that include an additional scalar degree of freedom, specifically, the Horndeski class of theories with a generalized potential term. The relevance of such a framework in the context of next generation spectroscopic surveys is then investigated using N-body simulations. The thesis concludes with ongoing and recently completed extensions to this framework, including interacting dark energy models and the effective field theory of large scale structure.