We explore the signatures of quintessence and modified gravity theories in the relativistic description of galaxy clustering within a parametrized post-Friedmann framework. For this purpose, we develop a calibration method to consistently account for horizon-scale effects in the linear parametrized post-Friedmann perturbations of minimally and nonminimally coupled scalar-tensor theories and test it against the full model-specific fluctuations. We further study the relativistic effects in galaxy clustering for the normal and self-accelerating branches of the Dvali-Gabadadze-Porrati braneworld model as well as for phenomenological modifications of gravity. We quantify the impact of modified gravity and dark energy models on galaxy clustering by computing the velocity-to-matter density ratio F , the velocity contribution R , and the potential contribution P and give an estimate of their detectability in future galaxy surveys. Our results show that, in general, the relativistic correction contains additional information on gravity and dark energy, which needs to be taken into account in consistent horizon-scale tests of departures from ΛCDM using the galaxy-density field.