Can one reasonably guess the gender of a person from their writing/speech contents? Is it possible to reasonably guess the gender of a person from a random sample of their writing (text, not handwriting)?

How about from the contents of their speech (not including their voice, of course)?
While you are probably better to ask your question over at the AI Stack Exchange for more practical answers on how to accomplish the task, I would also suggest you could take a look into the topics on Wikipedia for Sociolinguistics, and also Language and gender for the underlying theories as to why Machine learning models are able to make guesses/predictions with upwards of 80% accuracy in trained models such as the following.


Machine Learning Models of Text Categorization by Author Gender Using Topic-independent Features (86% accuracy - Russian corpus)
Investigating the Role of Emotion-Based Features in Author Gender Classification of Text (80% accuracy)
Gender Attribution: Tracing Stylometric Evidence Beyond Topic and Genre (85% accuracy)


So to fully answer your question 


  Can one reasonably guess the gender of a person from their writing/speech contents?


What is a 'reasonable guess' is not something I can define and is something you would wan't to think seriously about before using the predictions for anything of import to those you are labelling! However it would seem you can make a significantly better than random guess.