C. Gravitational forces brought together several moon-sized bodies, called planetesimals, to form larger bodies that became planets.
This answer accurately describes the role of gravity in the process of planetary formation. In the early solar system, gravity played a crucial role in attracting and merging smaller bodies known as planetesimals, eventually leading to the formation of larger planetary bodies.