I think the phrasing of "gravity" in the OP makes this difficult to understand what is being asked, and therefore, difficult to answer this clearly.
What is unambiguously true is that the gravitational effects of a change in position of a nearby object will not be felt by an object that is farther away than the edge of the visible universe.
Different questions can have different answers, though. If you are asking "does an object beyond the horizon feel gravitatianal effects from things on this side of the horizon, you have to consider that some of the local gravitational field was set up when the universe was very young, and if you believe in inflationary scenarios${}^{1}$, then there was a time in the distant past when the expansion rate of the universe was different, and the cosmological horizons included a much greater fraction of the mass of the universe. The gravitational field of these distant stars depends, partially, on the positions of objects in this very distant, primordial past.
Finally, I'll add the fact that the $\frac{1}{r^{2}}$ dependence in the leading term in gravitational force makes most of these effects quite small, and causes local objects to dominate, which is why the gravity you feel is governed mostly by the Earth, and the second-order effects come from the Moon and the Sun, then the other planets, and only then, from the bulk of the Milky Way, and THEN from cosmology. Almost all of these discussions involve the dynamics that happen amongst objects that aren't bound into "small" objects like galaxies.
${}^{1}$ And most of the best evidence we have says that inflationary scenarios fit the data we have best