One of the biggest puzzles in modern cosmology is the observed baryon asymmetry in the universe. In current models of baryogenesis gravity plays a secondary role, although the process is believed to have happened in the early universe, under the influence of an intense gravitational field. In the present work we resume Sakharovs original program for baryogenesis and propose a central role for gravity in the process. This is achieved through a non-minimal coupling (NMC) between the gravitational field and both the strong interaction field and the quark fields. When in action, the present mechanism leads to baryon number non-conservation and CP violation. Moreover, the NMC induces reduced effective quark masses, which favours a first order QCD phase transition. As a consequence, a baryon asymmetry can be attained in the transition from the quark epoch to the hadron epoch.