The donation follows a trip made on the line by Their Royal Highnesses Prince Charles and The Duchess of Cornwall to mark the 150th birthday of the line.
Arriva Trains Wales is partnering with the charity Welsh Hearts to campaign for a defibrillator on the 28 stations solely on the line from Bynea to Broome.
The campaign, which began earlier this month with two new defibrillators is now set to continue with fundraising activities being planned.
Llandovery and Builth Road will be getting the first two, with the next three locations still to be finalised.
Arriva Trains Wales Managing Director Tom Joyner said: "We were overwhelmed that His Royal Highness should make such an incredibly generous donation to this campaign. It really will make such a difference to people in communities the length of the line and we can't thank him enough, especially given the thousands of worthy causes he must come across every week. This really puts us on course to achieve our goal with Welsh Hearts which will be part of a lasting legacy we want to leave the railway at the end of our franchise."
Arriva Trains Wales Managing Director Tom Joyner welcomes Their Royal Highnesses to the Heart of Wales
Sharon Owen, Welsh Hearts Founder said:
“Welsh Hearts are delighted that HRH The Prince of Wales has donated to an appeal which is very close to his heart! "The donation will fund three more defibrillators on the Heart of Wales Line, an appeal to get public access defibrillators on stations throughout Wales."
David Edwards and Rachel Francis from the Heart of Wales Development Company said: "Supporters of the Heart of Wales Line, including the Development Company and Travellers Association, are delighted to learn that following his recent visit to us HRH the Prince of Wales is making a generous financial contribution to the Heart Defibrillator scheme for the line. It will provide a wonderful start to plans for each station along our route to be equipped with this lifesaving equipment. We are very grateful to HRH and his continued interest in our railway."
To make a donation please visit: https://www.justgiving.com/campaigns/charity/welshhearts/heartofwales