To understand how comets achieve extreme velocities without onboard propulsion, and how their predictable returns interact with the gravitational pull of other celestial bodies, we have to look at the mechanics of gravitational potential energy, orbital eccentricity, and planetary perturbations.

The primary reason a comet travels significantly faster than Earth or other planets when it enters the inner solar system comes down to the shape of its orbit and the conversion of gravitational energy. Earth and the major planets travel in nearly circular orbits, meaning their distance from the Sun remains relatively constant, and consequently, their orbital speeds remain fairly uniform (Earth moves at roughly 29.8 kilometers per second). Comets, by contrast, follow extremely elongated, highly eccentric elliptical orbits. According to the vis-viva equation, which governs the speed of any orbiting body:



where  is the orbital speed,  is the standard gravitational parameter of the Sun,  is the current distance from the Sun, and  is the semi-major axis (the average size of the orbit). When a comet is at aphelion (its farthest point, deep in the outer reaches of the solar system), its potential energy is maximized, and its kinetic speed drops to a crawl—sometimes only a few hundred meters per second. As the Sun's continuous gravitational pull draws the comet inward over decades or centuries, that vast store of gravitational potential energy converts directly into kinetic energy. By the time the comet reaches perihelion (its closest approach to the Sun), it is moving through a very deep gravitational well at speeds reaching 50 to 70 kilometers per second, or hundreds of kilometers per second in the case of sungrazing comets, without needing any internal engine.

Regarding whether comets veer due to the gravity of other objects: they actually do veer, and quite significantly. A common misconception is that periodic comets return like clockwork with exact, unchanging intervals down to the minute. In reality, comet schedules fluctuate because they are constantly perturbed by the gravitational fields of the major planets, predominantly Jupiter and Saturn. For example, Halley’s Comet does not have a fixed 76-year period; its orbital period has historically varied between roughly 74.4 and 79.2 years. When Edmond Halley calculated the comet’s return for 1758/1759, he had to account for the fact that close passes near Jupiter and Saturn had gravitationally delayed its journey by over 600 days compared to an unperturbed Keplerian orbit. In extreme cases, a close encounter with Jupiter can drastically alter a comet's trajectory, either capturing it into a much shorter-period orbit (creating the Jupiter-family comets), deflecting it directly into the Sun or a planet (as occurred with Comet Shoemaker-Levy 9 in 1994), or accelerating it past solar escape velocity to eject it from the system entirely.

The reason comets do not veer completely out of control on every orbit is the overwhelming mass dominance of the Sun, which accounts for approximately 99.86% of all the mass in the solar system. Unless a comet passes unusually close to a massive planet, the Sun’s gravitational force remains the primary force defining its conic section. Furthermore, in the context of the solar system's collective motion through the galaxy, all bodies within the Sun’s gravitational domain share that common galactic velocity vector. Because the Sun, planets, and comets are all falling together within the broader galactic field, local orbital motions are governed almost entirely by their mutual relative gravitational interactions.