An ellipse is the shape of Earth’s orbit that helps make the earliest sunrise and latest sunset fall near, rather than exactly on, the summer solstice.
Earth travels around the Sun in a slightly elliptical orbit, so its orbital speed changes during the year. That variation affects apparent solar time: the Sun does not cross the sky at exactly the same clock-time pace throughout the year. This effect is part of the equation of time.
Earth’s axial tilt is also essential. It creates the seasons and determines the changing length of daylight, while the orbital eccentricity shifts the timing of solar noon and the sunrise-and-sunset extremes. Together, these effects explain why the longest day, earliest sunrise, and latest sunset are separate dates.
The orbit is not a perfect circle, but “ellipse” does not mean a dramatically stretched oval. Earth’s path is only mildly elliptical; the axial tilt generally contributes more strongly to the seasonal pattern.