ref
mid 16th century: originally a standard written abbreviation; a colloquial usage since the early 19th century.
A clipped form of gentlemen. As a room, via misspelling of gents', a clipped form of gentlemen's room.