There's a short answer and a long answer to this question. In terms of "correctness," both are correct. In terms of usage, you'll find gray (with an "a") is favored by Americans while grey (with an "e") is favored by folks who live in the United Kingdom. So, grey or gray: what's the correct spelling? Let's dive a little deeper into the difference.
"Gray" evolved from the Old English word grǣg. You can see why it's difficult to choose between the letter A and E. Both vowels can make the same "AY" sound. There's no clear indication as to why the English went with E while the Americans went with A.
Interestingly, though, Samuel Johnson, an 18th century lexicographer and writer from England, considered "gray" to be the better version. In the end, the rest of the country didn't follow suit. And, if you continue to dig back in time, you can find references to both "gray" and "grey" in Webster's Dictionary.
When in doubt, try to correlate gray with an A for America, given the capital A in America. By the same token, try to associate grey with an E with England, given the capital E in England.
Of course, most of the United Kingdom uses "grey," including Northern Ireland, Scotland, Wales, and several offshore islands. But, England's surely the big Kahuna when one thinks of the United Kingdom. "Grey" is also the preferred spelling where British English prevails, like in Canada and Australia.
You're likely to see gray acting as an adjective, describing another noun, like "the gray chair" or "the gray skies." An example would be, "She placed the gray chair beside her night table."
Gray is also used as an adjective to indicate something that's dull, nondescript, or without any interesting qualities. An example of that would be, "The gray, faceless man disappeared into the shadow."
"Gray" can also act as a noun itself. In this manner, it's referring specifically to the color gray. So, you might see it used in a sentence like, "The room was painted in three different tones of gray."
When "gray" is functioning as a verb, it's typically referring to things that gray with age. Of course, the biggest reference would be to hair. An example would be, "She looked exactly the same except her hair had grayed a little around the temples."
In the debate between "grey" and "gray," it's best to simply follow the crowd in this instance. Should you ever find yourself living in England for a span of time, write your e-mails and draft your texts using "grey." If you remain in the United States for all your days, stick with "gray" and no one will look at you sideways.
It's nice to sort out the great debate between words that are commonly interchanged or confused. While this one doesn't have a firm right or wrong, there are plenty that do. Take a look at the most commonly confused words to make sure you land on the right side of popular grammatical debates.