The Horndeski gauge-gravity coupling is the leading non-minimal interaction between gravity and gauge bosons, and it preserves all the symmetries and the number of physical degrees of freedom of the standard model of particle physics and general relativity. In this paper we study the effects of the non-minimal interaction in astronomy and cosmology, and obtain upper bounds on the associated dimensionless coupling constant λ. From the modification of equations of motion of gauge bosons applied to compact astronomical objects, we find upper bounds |λ| ≲ 1088, |λ| ≲ 1070 and |λ| ≲ 1081 from a black hole shadow, neutron stars and white dwarfs, respectively. The bound |λ| ≲ 1070 that is deduced from neutron stars is the strongest and provides twenty orders of magnitude improvement of the previously known best bound on this parameter. On the other hand, the effects of this term on modification of the gravitational Poisson equation lead to a weaker bound |λ| ≲ 1098. From the propagation of gravitational waves we also find |λ| ≲ 10119, which is even weaker.