When I was 25 I wrote a vampire novel with a male narrator. The agent who took me on said it was partly because he'd been sure I was really a middle-aged guy writing under a female pseudonym.
When I was 29 I wrote a book that no-one was expecting. Publishers gave all kinds of reasons for rejecting it, but my very favourite remains: "the author's lack of visual appeal." (Don't worry: it did just fine. :-)
When I finally achieved success, it seemed to the Press to have come out of the blue (it hadn't). They repeatedly described me as a "housewife", even though I'd been working in academia for 15 years.