I'm a fan of P.D. James. She's a master of her genre, which happens to be detective novels, rather than SF. However, I think her 1992 dystopian novel Children of Men should well be considered science fictional.
Children of Men opens in January of 2021, the last recorded birth on Earth - now 25 - has been killed in a bar fight. Our narrator describes how the declining birth rate and eventual universal infertility lead a world without children and a population sliding into despair and hopelessness.
The world didn't give up hope until the generation born in 1995 reached sexual maturity, But when the testing was complete and not one of them could produce fertile sperm we knew that this was indeed the end of Homo sapiens. It was in that year, 2008, that the suicides increased.It's a bleak picture she paints of future childless England - and very different from her realistic present-day crime novels.
In her 1995 Paris Review interview , James describes the science* that inspired her novel:
[. . . ] I don’t think of [Children of Men] as science fiction, as some have claimed. I didn’t set out to write a moral fable, but it came out that way. This time it was not a setting that inspired it, but the review of a scientific book drawing attention to a dramatic drop in the sperm count of Western men—fifty percent in as many years. I asked some scientists about this and they said that it was perhaps due to pollution. But the article drew attention to another factor: that of all the billions of life-forms that have inhabited this earth, most have already died out, that the natural end of man is to disappear too, and that the time our species has spent on this planet is a mere blink. So I wondered what England would be like, say, twenty-five years after the last baby was born and then for twenty-five years no one had heard the cry of a baby. I sat down and wrote it.So she asked what kind of of future might arise from an extrapolation of present-day scientific findings. That definitely sounds like science fiction!
But the novel does feel very "English" from my American point of view, much in the same way James' novels featuring the Scotland Yard detective Adam Dalgleish do. I'm not sure if it's the realistic-seeming setting in the English countryside or the characters' mannerisms, but that aspect of Children of Men doesn't seem very science fictional. In that way it's much closer to Kazuo Ishiguro's Never Let Me Go, than "regular" science fiction.
Read the entire 1995 interview with P.D. James, in which she talks about being a feminist, writing about detectives, her belief in God and her preoccupation with death.
It's quite worth checking out all the Paris Review author interviews, since they cover a wide range of topics and, as Nicola Griffith pointed out, it's a an excellent way for anyone interested in writing to "get an education, for free".
* I think it's interesting that in the movie version of Children of Men, creator Alfonso Cuarón chose to twist the science underpinning the story 180 degrees by making women, rather than men, infertile. It isn't clear to me why that change was made. Cuarón has said the infertile women are a "metaphor for a fading sense of hope", but I don't why infertile men wouldn't play the same part - unless you think of male characters as individual humans, and female characters as symbols.