I was four when I started to play the piano. My teacher was my Irish grandmother, by then in her 80s yet still able to coax a Chopin waltz or a Beethoven sonata from slowly stiffening fingers. We studied from an ancient book called the Progressive Primer for the Pianoforte. I have it still, its tattered pages held together by yellowed strips of sticky tape, its pencilled marks the only record I have of my grandmother's writing. I can't say that I was a model pupil, but it didn't seem to matter. "Grand," she would say of my halting efforts. "Just grand!"

Sitting by her side on the piano stool, happily breathing in her 4711 cologne, our sessions soon strayed beyond the progressive primer. I loved stories and my grandmother loved to reminisce. No subject, it seemed, was off limits. I wonder, do the very old know that the very young are indeed listening? Or do they simply love to recall the past for their own sake? Their own comfort? I'm not sure.

What I do know is that I hung on to her words as readily as I lapped up her genius for the piano. Lessons in life emerged between attempts at Come to the Green Wood and Dance of the Gnomes.

My grandmother was born and brought up in northern Ireland in the late 19th century. She trained as a music teacher and became engaged to a young man in her village. It was an era when many people were looking to the colonies for a future. When my grandfather was offered a job managing a shoe shop in a small town called Cradock in South Africa, it must have seemed a wonderful – if somewhat daunting – chance to make a new life. The couple hoped to marry in Ireland before setting off for South Africa. But their adventure was delayed. My grandmother was required to remain behind in Ireland, while he went on to South Africa, until it was deemed that the engagement had been properly observed.

Their separation lasted for five years, their only contact the weekly letters each wrote. Finally, with her wedding dress in her suitcase and a chaperone in tow (of course), my grandmother was allowed to travel to England by train and boat, and then board a Union-Castle liner from Southampton. The first major port of call would be Cape Town where she would disembark and marry my grandfather on the same day. No time for either to change their minds. After a brief celebration, the newly weds would take the train to Cradock for their honeymoon.

But – and here her eyes sparked at the memory – there would be a twist to these careful plans. She met another suitor on board ship: a dashing English army officer returning to his regiment in India. She never said as much, but it was clear to me that they fell in love. Imagine serving five years of engagement apart, then when you are about to marry, you meet someone else.

She never told me his name; perhaps it had already faded from her mind. But his intentions were clear. He urged my grandmother to stay on board and travel to India with him, where they would marry as soon as they docked.

I can still remember my excitement at this potential wickedness. Why not? After all, no one back home would know until the first letters arrived and by then it would be too late to object. And the marriage would always carry the possibility of a return to the United Kingdom after a spell in India.

It must have been tempting. Marriage in South Africa would be a commitment for life. There would be no prospect of returning to see family and friends, no chance to re-settle back home. But my grandmother was a woman of her time, bound by duty and the conventions of her upbringing, and by genuine fondness for her fiancé. She set aside the shipboard romance, disembarked and married my grandfather on the same day, and started out on her new life as planned.

She and my grandfather – who, sadly, died before I was born – built what appears to have been a contented and music-filled life in their adopted country, with their four children. Did she ever regret her decision? Did she wonder – as the years went by – what she had missed?

She never said. Perhaps there was no time for regret. Certainly, there was much to her new life to distract from thwarted romance or what might have been.

When I look back on those years at the piano I realise that she operated with a very light touch. She suggested rather than insisted. She dropped hints, rather than imposed rules. Those precious lessons in life that I only dimly understood at the time were not born from instruction, but example: the way she lived and loved, and particularly the way she treated those around her. Even as a child I sensed she used a different approach from other adults. It came out in the way she spoke to me, as if I had an opinion that counted; and in the way she spoke to our housemaid, more as friend. And was I imagining it or did I detect a frisson of disapproval from the other adults in earshot? These were tiny nuances that set her apart, perhaps even from her own children – and then somehow skipped a generation and lodged within me.

What governs what we remember? Why is it that, even as young children, we store away a tone of voice, the choice of a word? For me, her gentle memories fed a quietly building crescendo in my own life. Sometimes I used to play in the family garden with the daughter of my parents' housemaid.

I remember wondering why we could play together today, but tomorrow we would have to go our separate ways. Would this sense of injustice have risen up in me without my grandmother's subtle influence?

Too often we ignore the elderly. We dismiss their stories as dated. But perhaps this passing on of memories is the most important part of ageing; a fundamental – and final – gift to the very young. My grandmother died when I was 13. By that time I had moved on from the intricacies of Chopin and was playing pop and ballads. At first, I thought that her greatest gift to me would be the music: her early encouragement, her delight in my progress even when I strayed from the classics, her passion that sparked a lifetime of pleasure for me at the piano. That would surely have been enough.

But as I grew up, her way of looking at the world began to assume greater importance: love versus duty, generosity versus inhibition and the ability of music to overcome prejudice.

None of us can know where the formative experiences of our lives will come from or where they will lead. I was lucky enough to meet a remarkable woman who, for a few years at the end of her life and at the beginning of mine, sat me down on a piano stool and taught me about life, love and the joyous, healing power of music. For that, I can never thank her enough.

• The Housemaid's Daughter by Barbara Mutch is published by Headline Review for £16.99. To order a copy for £12.74, with free UK p&p, go to theguardian.com/bookshop or call 0330 333 6846