Context. We report the exploitation of a sample of Solar System observations based on data from the third Gaia Data Release (Gaia DR3) of nearly 157 000 asteroids. It extends the epoch astrometric solution over the time coverage planned for the Gaia DR4, which is not expected before the end of 2025. This data set covers more than one full orbital period for the vast majority of these asteroids. The orbital solutions are derived from the Gaia data alone over a relatively short arc compared to the observation history of many of these asteroids. Aims. The work aims to produce orbital elements for a large set of asteroids based on 66 months of accurate astrometry provided by Gaia and to assess the accuracy of these orbital solutions with a comparison to the best available orbits derived from independent observations. A second validation is performed with accurate occultation timings. Methods. We processed the raw astrometric measurements of Gaia to obtain astrometric positions of moving objects with 1D sub-mas accuracy at the bright end. For each asteroid that we matched to the data, an orbit fitting was attempted in the form of the best fit of the initial conditions at the median epoch. The force model included Newtonian and relativistic accelerations to derive the observation equations, which were solved with a linear least-squares fit. Results. Orbits are provided in the form of state vectors in the International Celestial Reference Frame for 156 764 asteroids, including near-Earth objects, main-belt asteroids, and Trojans. For the asteroids with the best observations, the (formal) relative uncertainty σa/a is better than 10−10. Results are compared to orbits available from the Jet Propulsion Laboratory and MPC. Their orbits are based on much longer data arcs, but from positions of lower quality. The relative differences in semi-major axes have a mean of 5 × 10−10 and a scatter of 5 × 10−9.