Gray wore a sparkling red dress that she said was inspired by a volcano in the Philippines as she was handed the crown to the delight of a roaring crowd in the Thai capital that generally favored Southeast Asian contestants.
The 24-year-old singer and model said she wore red because "when I was 13, my mom said she had a dream that I would win Miss Universe in a red dress." She said her mom cried when they saw each other after she won the competition, the 67th Miss Universe pageant.
Gray edged out first runner-up Tamaryn Green of South Africa and third-place Sthefany Gutierrez of Venezuela. She succeeds Demi-Leigh Nel-Peters of South Africa.
In the Philippines, pageants are a popular attraction, and Gray's countrymen watching the televised contest cheered wildly and jumped for joy when she was declared the winner.
Celebrations were especially buoyant in Oas town in the northeastern province of Albay, from which Gray's Filipina mother hails. According to Gray, her gown's design, with its lava color and appearance, was influenced by Albay's iconic Mayon Volcano.
Gray's father is Australian, and she was born and grew up in Cairns, Australia. She studied at the Berklee College of Music in Boston in the United States.
The office of Philippine President Rodrigo Duterte was quick to congratulate the winner - the fourth Filipina to be named Miss Universe.
"Ms. Gray truly made the entire Philippines proud when she sashayed on the global stage and showcased the genuine qualities defining a Filipina beauty: confidence, grace, intelligence and strength in the face of tough challenges," Duterte said in a statement from the presidential palace. "In her success, Miss Philippines has shown to the world that women in our country have the ability to turn dreams into reality through passion, diligence, determination and hard work."
An early round of questioning touched on the issue of drugs, a controversial subject in the Philippines, where Duterte's aggressive anti-drug crackdown has taken thousands of lives, many in what critics charge were extrajudicial executions.
Duterte raised even more controversy when he recently joked that he smoked marijuana to deal with his busy schedule of meetings with other Asian leaders at a regional summit.
Asked what she thought about legalizing marijuana, Gray said: "I'm for it being used for medical use, but not so for recreational use. Because I think if people will argue, then what about alcohol and cigarettes? Everything is good, but in moderation."
This year's Miss Universe competition included the first-ever transgender contestant, Angela Ponce of Spain. She said in a video presentation that it was not important for her to win, but was more important for her "to be here."
One of the few controversies of this year's contest involved Miss United States, Sarah Rose Summers, who appeared to mock contestants from Cambodia and Vietnam over their English language skills. Summers apologized.
The finale was again hosted by Steve Harvey, who infamously announced the wrong winner in the 2015 contest. Harvey joked briefly about the incident in exchanges with contestants, saying, "You all can't let that go" and "I'm still here."
The theme of this year's pageant was "Empowered Women" and was judged by seven women, including former pageant winners, businesswomen and a fashion designer.