Is the phrase "ars gratia physicae" correct? What does it mean? Could it mean "Art for physics' sake"?
It is indeed correct. X[nom] gratia Y[gen] is a common way to say "X for the sake of Y". X has to be in nominative and Y in genitive. For ars and physica they are ars and physicae.
You could also use the Greek variant physice for physics, and the genitive would be physices. The standard Latin variant physicae is easier to understand. (The way this works is as follows: The word physica is an adjective used here without a noun. See this question for details. An adjective is always treated as a fully Latin word, so the Greek style declension is out of the question. However, the same happens in Greek, where the adjective φυσική alone can mean "physics". The Greek variant would be a direct borrowing of that substantivized Greek adjective, not of a plain adjective.)
The word gratia often comes after the genitive it works with. The phrase at hand is modeled after ars gratia artis or a variant thereof, and the analogy is kept strongest by keeping the original structure. A more typical way to put it in classical Latin would be ars physicae gratia.