The cause of the universe's expansion is believed to be dark energy, a hypothetical form of energy that is thought to permeate all of space and contribute to the accelerated expansion of the universe. Dark energy is associated with a property called negative pressure, which counteracts the attractive force of gravity and drives the expansion.
Gravity, on the other hand, is indeed an attractive force that tends to pull objects together. In the context of the universe's expansion, it might seem logical to expect gravity to eventually slow down or halt the expansion. However, the prevailing theory suggests that the influence of dark energy is currently dominant over gravity on large cosmological scales, which results in the accelerated expansion.
To understand this, it's important to note that the behavior of gravity depends on the total amount and distribution of matter and energy in the universe. If the density of matter and energy is high enough, gravity can slow down or reverse the expansion. On the other hand, if the density is low, as observations suggest, the repulsive effect of dark energy becomes significant, overpowering gravity and causing the expansion to accelerate.
It's worth mentioning that our understanding of dark energy is still incomplete, and it remains an area of active research in cosmology. The exact nature of dark energy and its interaction with gravity are still subjects of investigation and debate among scientists. Future discoveries and advancements in our understanding may provide more insights into the underlying mechanisms driving the expansion of the universe.