Accompanied by Prince Philip, the monarch stepped out on to the castle's newly refurbished Queen's Gate balcony, as she had done to cheering crowds at Charles’ investiture as Prince of Wales in 1969.
Part of a two-day trip to the Principality, her tour of the castle also involved a visit to the Royal Welch Fusiliers Museum and an encounter with the regimental mascot, a goat by the name of William Windsor.
Hundreds of flag-waving youngsters turned out to see the Queen, who last visited the castle in 1975 to present colours to the Royal Welsh regiment.
After leaving Caernarfon, the royal party boarded a black Pullman carriage for a brief journey on the Welsh Highland Railway to Dinas, before continuing up the coast to meet business students in Bangor and watch a youth theatre performance in Llandudno.
The Queen's tour concluded on Wednesday in Welshpool, where she visited the town's new multimillion-pound livestock market, one of the largest of its kind in Europe.
Meanwhile, a smiling Charles and Camilla were out on the town for the first time since the Duchess of Cornwall broke her leg while hill walking at Balmoral three weeks ago.
Charles chivalrously pushed his wheelchair-bound wife into the Royal Opera House, of which he is a patron, for the premiere of Aida on Tuesday evening.
Camilla, who has remained in good spirits about her injury, smiled and waved to photographers as she entered the theatre for the performance, which was also attended by Prince and Princess Michael of Kent.
The Duchess is expected to carry on with all her planned engagements despite having to wear a plaster cast for six weeks.