Gravity is a pair of forces of attraction between every two objects. Period !
It doesn't matter whether they're moving together, moving apart, moving gracefully in synchrony, or at rest. The gravitational forces of attraction between them are always there.