Vandals struck at the Royal Deeside Railway Preservation Society at Crathes in August 2015.
The Duke of Rothesay - as he is known north of the border - made a donation through The Prince of Wales's Charitable Foundation.
He drove the steam engine on a line he used to travel on as a child.
The Duke of Rothesay was shown the controls by volunteer driver James West, who said he was a "very good" driver on the short journey on a reconstructed section of the historic line towards Banchory and back.
Mr West said: "I never thought I'd teach the future King to drive a stream train.
"He's driven similar trains before, so kind of understood how they work.
"We chatted on the way down the line about how he'd travelled on the line as a child and he never believed he would travel on it again.
"He took the controls and did all the driving. I did the braking as we approached the platform. His driving was very good."
Prince Charles has driven a steam train after his foundation helped Aberdeenshire enthusiasts fund repairs costing thousands of pounds.