Gray over white, you should be fine. Think of it this way, primer is usually white, and you don't see that through the top color, so you'll be alright. You may have to just hit the gray with two coats to make sure the white is covered fully.
But, be warned. I just painted my garage last...