He said: "My family's affection for the Royal Navy is well known, and as I saw the work taking place here today, I was thinking of my grandfather, the Duke of Edinburgh. He would have been fascinated and very excited to see such advances in skills and technology being put into practice."
During his visit, William was taken on a tour by electrical apprentice Cara Shannon and spoke with some other apprentices and graduates in training.
He also attended a ceremony to mark the start of construction on HMS Belfast and officially cut the first plate of steel for the vessel, which is the third Type 26 Global Combat Ship to be manufactured by the shipyard and is designed to help protect the nation.
He said: "It is my great honour to play my own small part in the continued advances of the Royal Navy, by cutting the very first steel for Ship 3 – the HMS Belfast of the future.
"She will be only the second ship to have carried this name, her predecessor having conducted her duties with distinction and honour throughout the Second World War. The city of Belfast has always stood alongside Glasgow with a superb heritage of ship building, but now the city can once again become synonymous with Royal Naval power and maritime excellence.
"Catherine and I feel extremely privileged to become part of Team Type 26, and we look forward to following the journey of the ships, and their future crews, in the years to come."