All mass and energy in the universe has gravity. Light beams have gravity. Cosmic gaseous matter coalesces due to gravity, to form stars. Gravity’s range is infinite, though it becomes increasingly weaker with distance. Even a cup of coffee is subject to lunar tides.
There are a few exceptions or occurrences in the observable universe that gravity, as it’s currently understood, does not account for. A flyby anomaly has been experienced by spacecraft when attempting gravity assisted maneuvers. In such cases the spacecraft experienced a greater than expected acceleration. On on the outskirts of galaxies there are stars traveling at faster than expected velocities. These are what’s known as extra-fast stars. This anomaly can be accounted for with some modifications to Newtonian gravity, or else through dark matter, which is thought to interact with objects through gravity and not electromagnetically. The accelerating expansion of the universe is often attributed to dark matter, though another hypothesis is that the geometry of space is heterogeneous due to galaxy clusters. That is, the universe only appears to be experiencing accelerated expansion because it is assumed all space geometry is homogenous. There is also an anomaly of extra energetic photons. When light particles travel through a galaxy cluster they were long expected to gain energy and lose it again after they passed. The accelerating expansion of the universe should stop the energy returning to the passing photons, but particles dating back to the big bang, from what is known as the cosmic microwave background, seem to gain twice as much energy after traveling through galaxy clusters. This anomaly could be a problem of scale. It indicates that gravitational fall-off is not constant, but is faster at some distance scales. Another anomaly is that of extra massive hydrogen clouds. Hydrogen clouds at certain scales appear to be more clumped together than expected. Like the anomaly of extra energetic protons, this indicates that gravity falls off faster at certain distance scales. Our sun loses mass by radiating energy, but planetary orbits are widening much faster than this can account for. It is called the anomalous increase of the astronomical unit.
There are four known fundamental forces at play in physics. They are strong nuclear force, weak nuclear force, electromagnetism, and gravity. Of these four, gravity is the weakest. As a consequence of this, gravity is thought to have no significant influence at the level of subatomic particles. But on a macroscopic scale, it is the dominant force at play in the universe. Gravity is what causes the formation, shape, and orbit of most celestial bodies.