If you can read Chinese characters, there are clues that tell someone’s gender. For example, if you see this anywhere in someone’s name as part of a character: 女 then they are almost definitely a girl. That is the character for woman, nü. Even sven mentioned how certain traits that are more associated with a particular gender (like, usually men are not named for flowers) give clues also, but you really need the characters to even begin to guess, it is often difficult even for Chinese people to tell a name based on just hearing it.
The way that Chinese people explain characters to each other when speaking is very interesting to me, and I’m sure even sven heard this sentence a lot: (X) (Y) 的 (Y) You want to explain to them which Y you mean. Since Y has many different meanings using similar pronunciations, you choose a common compound word that has the Y in it you want, that anyone would recognize. For example, if you had the character 美 (mei, which means beautiful and is usually found in girls’ names) then you could clarify it from all the other meis by saying 美丽 的 美 (mei li de mei) which means “the ‘mei’ from ‘mei li,’” a common Chinese compound word that means beautiful. When you say that, everyone will know what mei you are talking about, and be able to understand its connotations.
Chinese parents tend to eschew choosing names based on sound or personal connections (like naming your son Reuben after that sandwich you had before you unexpectedly aced your first big job interview), instead favoring auspicious names that are tied to religious traditions. Therefore, the day your baby is born is very important for choosing a name, which must have the correct number of strokes and do appropriate justice to family traditions like generational names. This leads to the unique names sometimes, when the names that are cosmically suitable are limited for that baby.
The meaning must also be appropriately nice, though not necessarily TOO nice, naming your daughter Xi Shi (西施, the name of one of the 4 legendary beauties of China) would be seen as presumptuous by lots of people. Although, I guess you could name her that if you foresaw her as having big feet. Lots of older people have names like “Great Revolution” stemming from Maoist times, that doesn’t happen much these days though.
I’m trying to wrack my brain in thinking about which Chinese names, when read, are ambiguous about gender. I am sure I confronted that situation several times, but I can’t remember why the names confused my Chinese friends.