Hamilton, 34, had hoped to follow the footsteps of his father, George Hamilton, a previous competitor on the program. But the younger Hamilton and his professional partner, Edyta Sliwinska, failed to make it past the first foxtrot. They came into Wednesday's results show tied for last place with just 19 points out of 40.
Judge Bruno Tonioli said Hamilton's performance suffered from a "total lack of showmanship."
Hamilton said he was happy just to have had a chance to dance. "It's been a blast," he said. "I've had a great partner and it was a great experience."
Gray also scored 19 points for her two dances Tuesday. Judges admired her unique take on the Viennese waltz - "It was beautiful in it's own bizarre way," judge Carrie Ann Inaba said - but Gray and professional partner Jonathan Roberts still landed in last place.
Viewer votes are combined with judges' scores to determine which contestants are eliminated each week.
The 42-year-old Grammy winner said she "had a good time" on the show.
"Ballroom isn't my calling exactly, but I learned a little bit," she said.
Wednesday's episode also featured performances by reggae star Sean Kingston and the cast of "The Lion King" and a tribute to Patrick Swayze.
On the Net: