He was arraigned on Thursday in 10th Circuit Court in Salem.
The victim, who is not identified in court papers, reported the extortion threats to Salem police on April 17, according to Salem Police Det. Michael White.
The victim had a sexual encounter with Gray at his Springfield, Mass., apartment on April 12 after meeting through Craigslist, police said.
Before reporting the threats to police, the man had already paid $3,000 for furniture that Gray had on hold at a local chain store, according to police.
"Gray had threatened to tell (the man's) wife about their sexual encounter if (he) did not agree to buy the furniture," White said in a sworn affidavit. Gray also suggested to him that the apartment where they had their encounter was being recorded.
Gray also made it known that he knew where to contact the man's wife and family during a conversation with the victim, police said.
Gray called the victim on April 17 and demanded $2,400 more to be put on a gift card, again threatening to tell the man's wife about the encounter, according to White.
The state Attorney General's Office permitted Salem police to intercept a phone conversation between the victim and Gray, according to the police affidavit.
"After monitoring a number of phone calls between Gray and (the victim), they corroborated that Gray was attempting to get money from (the victim) for not disclosing their sexual encounter," White said in the arrest warrant.
During their investigation, Salem police discovered that Gray was arrested for a similar incident a year ago.
Gray was charged by Springfield, Mass., police for allegedly extorting a 76-year-old Connecticut man he met online for a sexual encounter. The case was later dropped by prosecutors when the victim refused to cooperate, according to a published report.
Gray is due back in 10th Circuit Court in Salem for a probable cause hearing on May 20.