Tom's Midnight Garden by Philippa Pearce does indeed reflect on the nature of childhood, adulthood, and old age. Let's look at some of the ways the story presents these various stages of life.
Tom is twelve years old when he goes to stay with his aunt and uncle in their flat in an old house. He is upset at being away from his brother and playmate, Peter, and stuck with adults who do not really understand children all that well for several weeks. One night, Tom slips out and sneaks downstairs to see why the clock just rang thirteen times. He goes outside and finds himself in a beautiful garden. Tom has gone back in time.
On his excursions into the past, Tom meets a girl named Hatty, and the two become friends. Hatty lived in the very same house where Tom is staying, only many decades in the past. Tom goes to visit Hatty often, but something strange begins to happen. Hatty starts growing up, but Tom remains the same age. This makes for a bit of awkwardness because Hatty is becoming a young woman. On his last excursion back in time, Hatty and Tom go skating, but Hatty now has a suitor, and by the end of Tom's trip back in time, Hatty can no longer see him. She has become an adult. She has left behind the things of childhood, and that means Tom.
However, in twist towards the end of the novel, it is revealed that the crabby, old Mrs. Bartholomew who lives in another flat in the house is actually Hatty. She has been extremely lonely in her old age, and she has been dreaming of her childhood. Somehow this has led to Tom's crossing over into the past. The young Tom and the now-elderly Hatty no longer care about their ages. They recognize each other, embrace, and pick up their friendship all over again.