Agnodice was a literary figure who may or may not have been based on a real person. She had to cross dress to get an education and to practice, but also filled a need for women patients who didn't want to expose themselves to strange men. The story of her trial seems so typical: women like this doctor, so let's try him for seduction. Oh, the doctor is a woman? Well, she must be innocent of seduction, but let's find another charge against her, like cross dressing.
Gaius Julius Hyginus most likely wrote the story as a springboard for a discussion of the propriety of a woman doctor vs. the need for women doctors, a valid debate at the time. That discussion devolved into whether Agnodice should be classified as a doctor or a midwife, which was silly anyway because there were no standards or licensing of either in ancient Greece, just a hierarchy of "importance" based on gender.
This comic is from Ryan North at Dinosaur Comics. (Thanks, WTM!)