Gay sex between both men and women is outlawed in Saudi Arabia. Punishments range from lashings to the death penalty.
The video footage of two men walking down an aisle at the alleged wedding ceremony went viral.
The Mecca Police said the “gay wedding scene” took place in the holy city last Friday and had “surprised” people there.
In the video, the men are sprayed with confetti as they walk side by side on a carpet at an outdoor venue. One of them seems to be wearing a long bridal veil.
On Monday night, Mecca Police said they had identified “the cross-dresser and other people involved in the incident”.
They had been arrested and their case referred to prosecutors, it added.
The force did not name the men or say what charges they faced.
Saudi Arabia has no written laws concerning sexual orientation or gender identity, but judges use principles of Islamic law to sanction people suspected of extra-marital sexual relations, homosexual sex or other “immoral” acts, according to US-based Human Rights Watch.
The country’s anti-cybercrime law also criminalises online activity impinging on “public order, religious values, public morals and privacy”.
In 2016, it was reported that government prosecutors were pushing for adherence to the death penalty for gay people, particularly as it relates to online activity.
However, breaking with ultra-conservative clerics, last October Crown Prince Mohammed bin Salman pledged a “moderate, open” Saudi Arabia catering to foreign investors and Saudi youth.