Cosmological footprints of gravity