Gray and grey are just different spellings of the same word, and they both refer to the color. Americans tend to use “gray,” and the British tend to use “grey.”
While there might be individual preferences for which word to use, there is no official distinction between the two words as far as meaning. They both refer to the color between black and white. When the word is featured inside of another word or phrase, variation is almost always accepted. For example, it’s permissible to say either grey squirrel or gray squirrel. There are a few words that can only be written one way though, such as the word “greyhound,” which refers to a type of dog. Both of the words come from the same word in Old English, and both variations have been around for centuries. The preference for using “gray” in the United States appears to have started sometime in the early 19th century.
Most English-speaking countries outside of the United States use the “grey” version of the word including Australia, New Zealand, England and any countries previously colonized by England. There are important exceptions though, such as Earl Grey tea, which is named for Charles Grey who was a British Prime Minister and the Earl of Grey.