The night before I go to meet Georgia Gould, I've been up very late reading the book her father, Philip, wrote in the months leading up to his death from oesophageal cancer, in November of last year. It is a book that seems made for the early hours, pitched as it is on the hallucinatory margin of life, whispering mortal thoughts in the dark. Lord Gould, the former New Labour pollster and strategist, approached his final weeks with all the inquisitiveness and rigour that helped him to shape three election victories for Tony Blair. When I Dieis a deeply matter-of-fact book, dwelling on the clinical detail and hopes and setbacks of four years fighting cancer with the sharpest of analytical minds, but it nevertheless tells a story that is illuminated on almost every page with moments of quiet wisdom and terrific love. The voice in which it is told, though it faces up squarely, obsessively, to the sentence that has been delivered – "three months to live, best case" – seems about as alive and engaged as any voice you can think of.

It is also, among other things, a wonderful book about fathers and daughters. Gould's two girls, Georgia and Grace, are a constant presence: "I hoped and believed that my relationship with my children was deepening all the time," Gould wrote, of those last months. "We implicitly decided to bring the future forward, to compress 10 years or so into one."

In his final weeks, in what he calls the "death zone" after being told by his surgeon in Newcastle and his consultant at the Royal Marsden that there will be no chance of surviving the cancer, all of Gould's life becomes more vivid. He takes his daughters to his childhood home in Woking and to his chosen plot in Highgate cemetery, the places of his beginning and end, and fills in for them all he knows of the world in between.

"The kids sucked me dry," he writes, with paternal pride. Georgia, a political junkie like her dad, at 24 a Labour councillor in Camden, north London, "wanted to know all about the way I thought… why did I believe what I believed?" Grace, 22 and a student, "wanted hard, practical advice".

Gould, despite the pain and frailty of those weeks, tries to do all he can to meet his children's needs; he prepares them for life without him, just as he prepares himself for that fact. The book is for them, you guess, as much as anything, and they complete it, along with Gould's wife, Gail Rebuck, with personal responses to what he has written. If that makes the book sound mawkish, it's not, though Grace floored this reader (and father of daughters) completely by quoting a section of the letter that he left for her to read after he had gone: "I know that you want me to answer every question that the future holds but I can't do that. Or at least I cannot do that in the way you wanted. What I can say is this: if you are yourself, if you trust yourself, if you believe in yourself, your life will be fine. As for the rest of it: be generous and warm-hearted and always send a thank-you card. This is all you need to know. And if you get really stuck ask Matthew [Freud] and if he can't help, ask the universe. The answer is out there and I promise you will find it."

Georgia Gould does not quote from her father's letter to her, though she says she reads it all the time, but her valediction is no less moving, detailing the closeness and moments of comedy of the final days, with a kind of euphoria. When Gould almost dies one night, and the next morning is instead given three or four days to live, she experiences a strange joy at the extra time granted, more precious hours to talk with him about their twin passions, Queens Park Rangers and the Labour party, more time to help him get his book finished. "I remember announcing in the evening that this was the happiest day of my life and my family all looked at me like I had lost the plot. But it was true."

A few months on, in the offices of the book's publisher, overlooking the Thames, Georgia Gould still carries that mix of grief and gratitude with her. And she remembers that surprising emotion very well: "Dad had been going on about the death zone and how for him time had stood still; how since he had accepted the terminal diagnosis he wasn't thinking about anything but the moment, the power of his relationships. I had found it hard to get to the place he was in, but in those last few days I suddenly understood. I genuinely sat there and thought, this is the best day of my life."

Georgia had looked after her father in Newcastle, where he had gone to a wonderful NHS oesophageal cancer unit run by Professor Michael Griffin, when his cancer returned after two years remission following an initial operation at the Memorial Sloan-Kettering hospital in New York. They had clashed, gently, over his initial instinct to seek private treatment in America, which, after much consultation, he believed to be his best chance of survival.

As Gould concedes in the book, his eldest daughter felt vindicated, if that is the word, by his return to the NHS. "I spent a lot of time with him in Newcastle," Georgia recalls, "and he was in tremendous pain but he never wanted to switch off. He was always interested in what it all meant and his experiences. He felt he had something to say about cancer."

He wrote about some of those experiences in a series of pieces for the Times, which received a hugely sympathetic response. The idea for the book grew out of them. "He became very focused on what he thought was important," Georgia says, "and one of the most important things was the book. He had these terrible symptoms, because he no longer had a stomach, he was always very nauseous and he had a feeding tube and just wasn't very well. He was finding it hard to write. I remember sitting at his bedside with his agent, who was also a good friend, and him saying, 'Give me a deadline, I need a deadline', and us all cracking up laughing."

In the end, one of the things that troubled Gould as that ultimate deadline approached was that the book was unfinished. After the night he almost died, he rallied himself one last time. He was wearing a strange bubble over his head, like an astronaut's helmet, to assist with his breathing, and his arms were too bloated to type, but he found the strength, deadline pressure being what it is, to dictate a final chapter to his wife and children. "When he really realised he might only have a day left he wrote a huge amount of it," Georgia says. "He just spoke and spoke. I don't know where that energy came from. He was full of drugs at that time and you weren't really sure if he was actually with you, but then this amazing material would come out of him. My sister was saying, 'He almost looks possessed'. He had certainly gone very deep inside himself and it all just came out."

Gould had spent a career listening – he pioneered the use of focus groups as a way of making politics more responsive to people's deeper hopes and anxieties. Was this, I wonder, a conscious effort to step to the front of the stage, as it were – to have his own say?

"In a way," Georgia suggests. "But he had always been a strategist. The focus groups were very important in terms of listening, but he could also pick the absolute right details out of them and form a strategy. That was how he approached life. He had a strategy for attacking the cancer that made him more confident and more determined than he had ever been in his life."

One of the great things about the book is that although Gould's political colleagues, particularly his closest friend Alastair Campbell and to some extent Tony Blair, have strong walk-on parts, there is a narrowing to the people that matter most to him, to Georgia and Grace, and of course to his wife, Gail, whose public role as chair and chief executive of the publisher Random House also falls away to be replaced by her private, intimate presence as his constant support. Their relationship began at Sussex University and it was his desire for it to continue, their daughter suggests, that kept him going through the worst of the operations and chemotherapy.

"He would say, 'I tried religion and that doesn't help and I tried meditation and that doesn't help. The only thing that pulled me through was thinking about your mum.' He was staying alive for her, I think. They had been really looking forward to growing old together, going travelling. Certainly, towards the end, he was never really happy unless she was in the room."

Rebuck's contribution to the book, though heartfelt, is more reticent than what goes before and I ask Georgia if her mother had qualms about this very public form of farewell.

"My mum has always been much more private than my dad. He was incredibly gregarious and wanted people around him. To begin with, she was, I think, slightly aghast at all of this happening – the Times pieces, the interviews he gave, and the film [Gould also made a eight-minute film, shot during the last two weeks of his life]. She has come round to it a lot and is much more positive about it all and I think he was aware of that sensitivity, but it wasn't always easy. What it did do, though, was to help in forcing us to confront what was happening to him and, more importantly, it gave him some sense of meaning about it all."

Rebuck partly blamed the cancer on the stresses of her husband's political life, but her daughter, who admits to measuring out her own childhood in election campaigns, is more forgiving. If it hadn't been politics, she suggests, her father's tremendous nervous energy would only have been directed elsewhere; it was who he was. Rebuck wasn't entirely happy that Georgia wanted to pursue a political career either. On leaving Oxford, having been involved in Labour politics all her life, she nevertheless immediately put herself forward as a prospective Labour MP for the Thamesmead and Erith constituency in 2009. She was "genuinely shocked" by the minor furore that followed, which characterised her as a New Labour "golden girl" exploiting her father's connections to get ahead. It was a sharp learning curve, she suggests, to have journalists outside her front door but it hasn't put her off; she spent too much of her formative years knocking on constituency doors with her dad for that. "There was this funny idea that he had pushed me into it," she says, with a smile, "as if he was well enough to push anyone into anything."

Alongside When I Die, Gould also worked on a revised edition of his account of the New Labour project, The Unfinished Revolution, and Georgia collaborated. He was no doubt proud that his daughter shared his practical, progressive vision, but then, she says, "he was supportive of us whatever we wanted to do".

Did he write the same letter to her, as he did to her sister?

"No," she says, "completely different, I think, though we haven't read all of each other's. He gave me five sort of rules, the first of which was to always live with purpose."

If there is a rule in the book itself, I suggest, it is exactly that there is no part of life that is without meaning, particularly the end. In that sense, it is a book about living, as much as one about dying.

"Exactly that. We should all live, in a way, as if we knew we were going to die in three months time. Live with purpose."

Her father was obviously open to religious meanings, without ever fully adopting faith…

"He was always spiritual, throughout his life," she says. "My mum and my sister and me are all Jewish. His sister is a church of England priest. But it wasn't the fundamental thing for him. He had this strong belief that it was not God who judges you at the end of your life but that you judge yourself. Have you lived well?"

In that sense, it revives an old-fashioned kind of idea, that of preparedness for death, of having "a good death"?

"He certainly came to believe it was an important time, if not the most important time. We had to sit and have meetings about his funeral and all that. And it worked in that the one thing I don't have is any regrets. There is nothing I wish I had said."

Though the book dwells on everything up to the moment of death, it does not speculate at all about anything after. Did he ever discuss that?

"No, it was not important to him. He would say, 'I will always be with you', but he meant in our thoughts and memories." She smiles. "He used to say he thought he was a better dad when he was ill, but the fact is he was always a brilliant dad."