Gravity and the universe