Maybe you're looking for "Hello Summer, Goodbye" by Michael G. Coney.
The world is about to become uninhabitable due to nuclear war or disaster.
The planet is about to enter a global winter.
The main character (a girl) survives in the end, by going into a safe bunker facility.
"Hello Summer, Goodbye" has a boy as main character; he and his family are important enough to enter the safe facility.
Her boyfriend whom she met during the summer is on the wrong side of the fence / not one of the chosen ones, so he will not survive.
The girlfriend being literally on the wrong side of the fence and the main character talking to her and them holding hands through the fence for hours and days is a haunting scene in this book.
If the story you read indeed is "Hello Summer, Goodbye", the final twist of the story might explain why you misremembered the girl as the survivor:
While the rich and powerful deem themselves lucky in their safe bunker, the humans outside seem to have their own, advantageous way to survive the long winter. At the end, the boy leaves the bunker, hoping to join his girlfriend and her people.