The answer to your question depends on what we mean by "gravity". When Einstein came up with his field equations, which are the core of general relativity, he encountered a number of possible mathematical choices that one can make with regards to their form.
One of those choices is the inclusion of the cosmological constant. Without the knowledge of precision cosmology data that constant is not actually motivated by physics. Just looking at the set of effects of Newtonian gravity and post-Newtonian gravity (like the perihelion shift of Mercury) that Einstein actually knew about, this constant is either not needed or should be set to zero. Einstein included it anyway because it is required to produce a cosmological solution that is static and he liked the idea of a static, eternal universe, even though no such observational information was available to him. He made a personal philosophical choice, if you like.
Unfortunately for him the Hubble expansion of the universe was discovered soon thereafter, rendering the original need for that constant unnecessary. Einstein called this "his greatest blunder". In a complete reversal of fortunes more precise measurements than those of Hubble and other early precision cosmologists have now turned up an acceleration in the expansion of the universe, which, in the language of general relativity requires the cosmological constant once again! In short, Einstein blundered more when he said that he should have excluded it than when he put it in!
And here is the big question: is "gravity" what we see acting on the short distance scales of planets and solar system and galaxies (requiring no cosmological constant), or is gravity what is obviously acting on the whole universe? If we agree to the latter, and if we take general relativity very seriously (which I personally have decided to do at this level of physical description), then the cosmological constant is part of a consistent description of "gravity". We can't see it on small scales because it is too weak, but on large scales it actually dominates the dynamic and it makes the universe expand ever faster, at least for the time being.
Now, one can take the approach that "gravity" is one force and the cosmological constant is another for which we simply haven't found the proper dynamic equations, yet. In that case it would be nothing but a mathematical accident in the theory of general relativity: nature fooled us again by allowing us to fudge a non-gravitational interaction into the equations of gravity.
That question is, for the time being, not decidable. You can take the side of "gravity" being "ordinary gravity plus the cosmological constant" or you can assume that it's just a fudge. It's a matter of taste, really.