Is gravity a law or theory?
There is a law of gravitation and also a theory of gravitation.
In physics a law describes a natural phenomenon, but does not attempt to describe how it works.
Newton's law of gravitation describes the attractive force
This is a law because it describes the force but makes not attempt to explain how the force works.
A theory is an explanation of a natural phenomenon. Einstein's General Theory of Relativity explains how gravity works by describing gravity as the effect of curvature of four dimensional spacetime.
Einstein also produced an equation which describes gravity. It may look simple, but in reality it is very complex and very hard to solve.
So, we have both a law and a theory of gravity.