Charles toured Dunrobin Castle Station, part of the Duke of Sutherland's railway which is believed to be the only part of the national rail network to have been planned, financed and opened by one person.
The Highland line created by the duke runs from Golspie to Helmsdale and opened on May 16, 1871.
The prince, who is also known by his Scottish title the Duke of Rothesay when in Scotland, toured Dunrobin station on Sunday with its honorary station master, Daniel Brittain-Catlin.
Alan Ross, Network Rail director of engineering and asset management (Scotland), gave a speech during the visit.
He said: "This, the 150th anniversary, is the perfect occasion to celebrate the work of the third Duke of Sutherland, who in modern day terms spent about £45 million on his various railway projects, including his own line and his own train.
"I think it goes without saying that if anyone here is prepared to invest a similar sum today, we at Network Rail would be most interested to hear from you.
"On a more serious note, as we slowly emerge from the Covid pandemic it's becoming clear there is growth in the leisure market for our railways, which presents an opportunity for this station and others like it in tourist hot spots."
Trains to Dunrobin are today operated by Scotrail's Far North Line, but it was used exclusively by the Sutherland family and guests from 1871 until the Second World War.