Janet Harvey hands me a piece of history. It's just a small hammer but this simple tool helped build some of the biggest battleships constructed on Clydeside during the Second World War. And remarkably for the time, the hands that wielded this hammer belonged not to a swarthy male riveter, but to a slight young woman who had begun her career as a shopworker.

In 1940 at the age of 18, Janet Harvey became one of the thousands of women drafted into the workforce to help the war effort, in roles previously dominated by men. Now 96, she struggles to picture herself as the boiler-suited shipyard electrician she once was, climbing down a narrow, vertical ladder into the bowels of a boat each morning to wire up cabins.

“I tried not to look down,” she recalls of the first time she made the descent. For although she was young and fit, she had to negotiate those precipitous rungs with one hand clutching her precious toolbox.

That toolbox made her feel “very important” and she kept hold of it even after she and her female colleagues were unceremoniously dismissed from the shipyards following the war's end. For a while afterwards, neighbours would “chap her up” to change a fuse or wire a lamp and one by one her pliers, screwdrivers and other tools were lent out or given away. The hammer, its shaft burnished to a shine by years of careful use, is all she has left.

“They called us sparkies,” she says proudly as we talk in the neat front room of her Glasgow home. “But I forget it all now and my hands are no use with rheumatics.”

Seven decades after she left the shipyards it still rankles with Janet that she and her female colleagues were “tossed aside like old rags” at the end of the war. “They just pushed us out. We never even got a thank you note to say, you did a good job.”

At the end of this month, however, Janet Harvey will finally receive recognition for her six years of unstinting service. She's to be awarded with an honorary doctorate of engineering from Glasgow Caledonian University “in recognition of her outstanding contribution to the war effort with the Glasgow shipyards, and her commitment to the values of our University mission for the common good”.

She laughs and says: “Who ever thought a wee smout like me would become a doctor of engineering? It's unbelievable, isn't it? Somebody from a working-class family.”

Born in 1922 at a time when engineering was decidedly a man's job, Janet Harvey was a gifted pupil but, like many working-class children, she left school at 14 to help support her family. Her ship's carpenter father had been forced to cross the Atlantic in search of work during the Depression and when her mother died of pneumonia in 1930, Janet and her two older brothers were taken in by their aunt.

“My aunt was a widow woman, working as a cleaner,” says Janet. “She never got a halfpenny to keep us and it was quite a struggle for her. So I had a very hard beginning, nobody knows how hard it was and how hard it was to lose your mum.”

From the age of 14, Janet worked as a shop assistant earning 10 shillings (50p) a week. When the Second World War started, her brothers Jimmy and Alex were called up to the armed forces. Then one day, shortly after her 18th birthday, a letter arrived. “It told me I would have to register for war work,” she remembers. At her interview, she was given three choices: welding, joining the land army, or training as an electrician. She opted for the latter and after three months in technical college, she and four other young women began at Harland and Wolff's Fairfield yard in Govan.

She shows me a photograph of the five of them lined up together on Harmony Row. Those navy blue boiler suits took some getting used to, she remembers – “ladies didn't wear trousers then” – but she liked the work and was good at it.

“I picked it up very quickly, as did most of the girls. The men said, 'You'll have to stop doing it so fast.' They used to take about a week to do what we were doing in two or three days.”

Why was that? “At the beginning of the war it was a bit lax,” she says. “In Govan – and this is the truth – a lot of the men used to come in, clock in and walk back out again. There was a picture hall near the shipyard and they would spend a bit of time there and then come in. Nobody seemed to bother, I think because there was such a scarcity of men. The men that were there were really appreciated.”

With all able-bodied males serving in the armed forces, many of those working in shipyards were older or disabled.“They couldn't have done without the ladies because there was such a lot of work to be done and so many men away. Every man that was fit was called up.”

Each of the women worked with a “mate” who would carry the heavy cables and, for the most part, the men were “very, very nice”. They even apologised for their effing and blinding, though Janet was shocked by the Navy blue language she overheard below decks. “I had two brothers, and I'd never heard them swearing. You would open a cabin door and, oh, the language ... every second word, they couldn't do a sentence without one.”

Some lads got up to hijinks, hiding the girls' toolboxes or giving them “wee electric shocks” and in those pre #MeToo days, the yards were unreconstructed places. “The men weren't used to women on the ship. They used to whistle after me and I hated it. My hair was very blonde then and I started to put on a brownish tint to put it down a bit.” Did it make a difference? “Not really.”

She enjoyed the work and seems to have been highly valued. The yards were under a lot of pressure to finish ships and after a year at Fairfield, Janet was transferred to John Brown's in Clydebank. It was the height of the Blitz and the town had been ravaged by bombs, but with air raids generally happening after dark, she wasn't frightened at work.

What troubled her was being woken by sirens and having to troop down to the shelter almost every night. For a young woman who left for work at 6.30am, often worked weekends and sometimes went to bed hungry, exhaustion was one of the most challenging aspects of the war – not least because it meant she was too tired for socialising.

“You lost your life for six years,” she says now. “At 18, I'd just started to go to the dancing. My aunt had said, 'When I was young I never learned to dance and I always felt like a wallflower.' So she made my brother Alex take me with him to the dances and I picked it up very quickly.”

As the war years rolled on, however, the vibrant young woman who'd happily have spent her whole life foxtrotting and quickstepping found she had neither the time nor the energy to go out, despite the fact she was earning better wages than she'd got from shop working.

But there were compensations. Watching the ships launch was wonderful, she recalls: “Everything's all go, go, go and then they hit the things at the side that were holding the ship and woooo …” She imitates the peculiar noise of a vessel sliding down the slipway. “It was very exciting.”

Those boats were built for a deadly purpose, of course, and she often wondered what would happen to the young men who'd be sleeping in the cabins she was wiring up. She thought about Alex who was in the Army and her elder brother, Jimmy, who was in the Navy and had been involved in the evacuation of Dunkirk in 1940.

And then it was all over. Following the surrender of Germany on May 7, 1945, the shipyards closed for a holiday and Janet joined the jubilant throng on the streets of Glasgow.

“The town was jammed,” she recalls. “Everybody was out celebrating, so happy that it was over. The place was mobbed with people, everybody was shaking hands with everybody. It was a sad time too because such a lot of people had lost brothers and other relatives. I was very fortunate, my two brothers came home.”

After the war ended, on September 2, female employees were kept on for a year. At John Brown's, Janet was working on HMS Vanguard, then the biggest and fastest Royal Navy battleship ever built. Although launched by Princess Elizabeth in 1944, it wasn't completed until 1946.

Janet will never forget the day the crew came on board to inspect the finished vessel. “They said what a lovely job we'd done, they were quite thrilled that the ladies had a part in it. You felt as though your hat wouldn't fit you, getting all those compliments from the captain and the officers, all with their braid and their lovely uniforms.”

It was not to last, however. In September 1946, the Government's Essential Work Order, which had tied workers to jobs considered vital to the war effort, was withdrawn and, as happened during the First World War, women who had fulfilled those vital functions became surplus to industrial requirements.

“In 1946 they just gave us our papers telling us our services were no longer required,” recalls Janet. Had she hoped to carry on as an electrician? “I would have loved it but I knew in my heart they would never keep us on. The time we served, you could have been a full electrician. But it was a man's world.”

She was going to be married, she tells me. “He was in the army and he promised when his time was up he'd leave. But he couldn't leave. He was getting posted overseas and he couldn't give it up. If you're long-term in the army that's your life; a lot of them can't adjust to civilian life.

“A war changes your life,” she adds thoughtfully. “My life would have been different entirely if it hadn't been for the shipyards.”

I ask if she remembers the Vanguard being scrapped in the early 1960s. “I thought that was sad,” she says. “All our handiwork, all our cables! I remember reading about it and thinking oh my goodness, it's away after all the work we did on it.”

She was, she says, happy to return to shop work where she became a manageress, and there's a whole other story to be told about her time in the Co-operative during the hungry, post-war years when she had to use all her powers of diplomacy and discretion in dealing with hard-up customers – and sometimes their children – who came asking for tick. “They used to say, can I get a line, Janet? It wouldn't be much, five or six shillings. And then they would come in and pay you when they got their money. And the next week it would start again: another wee line.”

Janet stayed with her aunt, caring for her until she died in her early 80s. At 50, she left the Co-op and took a management job with Tennent's. When she retired aged 60, she took the opportunity to travel the world as a cruise-ship passenger, finally getting to taste the glamorous ocean-bound life she'd dreamed about while working below deck. Even today she “never sits still” and has a weekly schedule of church visits, keep fit classes and dance sessions, though after falling and breaking her hip she's not as sprightly as she once was.

She's looking forward to receiving her honorary degree from Glasgow Caledonian University. “Fancy that, getting a doctorate.” And she's delighted that, although women continue to be under-represented in the industry, there will be young female electrical engineers graduating alongside her.

“It is a good thing women are getting into what was a man's world,” she says and her advice to those young graduates is to “just stick in, pick up as much as you can”.

At 96, Janet Harvey is an inspirational woman but as I hand back her shipyard hammer, I can't help wondering how different things might have been if women who could wire up a cabin twice as fast as men had been allowed to develop their skills, all those years ago.

Given the opportunity, I think those vital sparks would have lit up the world.

Janet Harvey will be awarded her doctorate of engineering from Glasgow Caledonian University on November 27