I was thinking that "theory" was just another word for "law."
No, a theory often consists of several laws (though it may have just one).
So, for example, the theory of electromagnetism has as its basic laws the four Maxwell equations; Newton's theory of motion has as its basic laws Newton's second and third laws of motion (the first may be derived from the second). I've already given the theory of evolution as an example.
So it would be improper to speak of the "theory of gravity"?
Not at all, or scientists wouldn't go about speaking of the theory of gravity: which consists of the laws of motion plus the law of gravity.
You may note that the law of gravity on its own would
not be a theory, because it would not explain or predict anything. It says nothing to say: "there will be such-and-such a force between two bodies of such-and-such a mass", unless you also have laws saying how a mass will behave when a force acts on it. It is only the
collection of laws --- the
theory --- which allows us to explain and predict.