Petty Officer (Mine Warfare) Mark Titman, 34, got down on one knee on the deck of HMS Penzance while his crew mates held a banner which said "Will you marry me?".
It was a "massive surprise" for his girlfriend Laura Campbell, who was waiting on the quayside with the couple's baby Ava, and happily said yes.
Petty Officer Titman, from Sheffield, then got down on bended knee to put a ring on her finger and present her with a bouquet of flowers after disembarking at HM Naval Base Clyde.
He said: "I got the ring in April so I knew I was going to do it, so I was just getting loads of ideas. I had a few ideas and narrowed it down to this one. My crew mates knew about it and helped out."
He joked: "I thought this was the best way to do it - spell it out to her to give her a bit of a heads up."
He added: "I am proud to be able to do my job and even more proud of the way that my partner Laura has coped in bringing up our daughter. It leaves me in no doubt whatsoever that she is the perfect woman for me."
Ms Campbell, from the Glasgow area, who also has a 10-year-old daughter Caitlynn, was not prepared for the proposal.
The 32-year-old said: "It was a massive surprise. We had talked about it and stuff, but not anytime soon, so it was a lovely surprise."
Petty Officer Titman, who has two other children aged 10 and seven, was happy to be reunited with Ava who was just four-weeks-old when he and the rest of the crew were deployed to the Gulf in January.
Families and friends were waiting on the quayside to greet the crew as the ship returned from its three-year deployment in the Gulf, having left Faslane in June 2014.
A lone piper played from the deck of the vessel and the Royal Armoured Corps Band then played on the quay to welcome Crew 1, who have been operating the vessel since January.
HMS Penzance is a Sandown Class Mine Counter Measures Vessel (MCMV), one of seven such ships operated by First Mine Counter Measures crew from Faslane.
Built of glass-reinforced plastic so as not to trigger magnetic mines, the Sandown Class has the latest mine hunting technology.
In January this year she was one of five Royal Navy vessels which joined forces with the United States Mine Hunting vessels and aircraft to take part in a major exercise in the Arabian Gulf, testing their prowess in locating underwater explosives.
Working alongside HMS Bangor, HMS Chiddingfold, HMS Daring and command ship RFA Lyme Bay, HMS Penzance helped clear an exercise minefield, making use of unmanned underwater vehicles, divers, helicopters and other specialist equipment in challenging conditions.
Commanding Officer, Lieutenant Commander Jim Lovell, said: "The ship has performed everything asked of her during the deployment and I could not be more proud of myShip's Company.
"A professional and versatile team, they have delivered everything I have asked of them but now it's time for some very well earned leave."
Lt Cdr Lovell said the crew all knew about the romantic plan and were backing Petty Officer Titman.
He said: "Everyone on board has known about it - he was nervous as heck last night and this morning.
"He seemed quite confident last week and he's just been getting more nervous today, but we're just thankful she said yes.
"I don't quite know how we'd have dealt with that if not, but he'll have a fantastic leave now, well deserved and I'm really pleased for the two of them this morning."