After leaving Wolverhampton Crown Court, Williams posed for photos with fans.
The pop star laughed and joked with members of the public who recognised him near the court.
During a 36-minute hearing on Thursday, he spoke only to confirm his name, date of birth and nationality as well as to deny the charge.
Co-defendant Jamien Nagadhana, 31, from Hounslow, west London, denied assault by penetration in connection with the same incident.
Williams, of Croydon, south London, was granted unconditional bail until his trial on May 14 next year at the same court.
After the allegations came to light, Williams said he would be stepping back from charity work, adding: “Press speculation is likely to be unhelpful to the charities I work with.”
Reporting by Press Association.