Can gravity create a rainbow? Almost certainly, no; but yes, it can certainly bend it.
Certitude in our knowledge of our universe is embarrassingly small: we know gravity, matter, electricity, light and its speed, and forces which are combinations of one with another or multiple others.
Beyond that, yes, that the universe is infinite, eternal, and never static. Even sound is not elementary, dear Watson: it is only a slave created or let loose by any one of these named forces.
The universe is never static. Nothing in it ever is; from the Magellanic Cloud to subatomic particles, changes happen in ceaseless cycles. The universe itself is happening; everything in it is continually happening, without pause, thought, malice, or benevolence. It happens, within it things happen; in these happenings, another other happenings happen.