We perform a novel test of general relativity by measuring the gravitational constant in the Large Magellanic Cloud (LMC). The LMC contains six well-studied Cepheid variable stars in detached eclipsing binaries. Radial velocity and photometric observations enable a complete orbital solution, and precise measurements of the Cepheids’ periods permit detailed stellar modelling. Both are sensitive to the strength of gravity, the former via Kepler’s third law and the latter through the gravitational free-fall time. We jointly fit the observables for stellar parameters and the gravitational constant. Performing a full Markov Chain Monte Carlo analysis of the parameter space including all relevant nuisance parameters, we constrain the gravitational constant in the Large Magellanic Cloud relative to the Solar System to be GLMC/GSS=0.93+0.05−0.04. We discuss the implications of this 5% measurement of Newton’s constant in another galaxy for dark energy and modified gravity theories. This result excludes one Cepheid, CEP-1812, which is an outlier and needs further study: it is either a highly unusual system to which our model does not apply, or it prefers GLMC < GSS at 2.6σ. We also obtain new bounds on critical parameters that appear in semianalytic descriptions of stellar processes. In particular, we measure the mixing length parameter to be α = 0.90 +0.36−0.26 (when assumed to be constant across our sample), and obtain constraints on the parameters describing turbulent dissipation and convective flux.