Sales will benefit the Equality Florida Pulse Victims Fund, the GLBT Community Center of Central Florida and GLAAD.
The June 12 shooting at the Pulse nightclub left 49 people dead and dozens injured. It's the worst mass-shooting in recent U.S. history.
Jason Derulo, Kacey Musgraves, Prince Royce, Nate Ruess, Troye Sivan, Jussie Smollett, Adam Lambert, Tyler Glenn of Neon Trees, Mary Lambert and the Trans Chorus of Los Angeles also appear on the song.
"Hands" was co-produced by Grammy winner Mark Ronson (Amy Winehouse, Bruno Mars) and was co-written by Julia Michaels and Justin Tranter, the duo who also worked on hits like Justin Bieber's "Sorry," Nick Jonas' "Close" and Gomez's "Good for You," featuring A$AP Rocky.