Trump's company, Trump International Golf Club Scotland Limited, owns the Menie Links golf course at Balmedie, Aberdeenshire.
The firm fiercely objected when Scottish ministers granted planning permission for up to 11 wind turbines about 3.5 kilometres out to sea.
The turbines, part of the European Offshore Wind Deployment Centre, in Aberdeen Bay, would be visible from the golf resort.
The consent - granted subject to conditions under section 36 of the Electricity Act 1989 - was challenged by the company through the Scottish courts without success.
On appeal to the Supreme Court, its lawyers argued that the ministers simply had no power to grant the consent.
It was submitted that such consents could only be granted to existing holders of licences to generate, transmit or supply electricity or to those exempt from the licensing regime.
It was also argued that a condition attached to the consent - requiring submission and approval of a design statement - was so uncertain in its meaning as to be void.
In dismissing the company's appeal, however, the court noted that the 1998 Act had been introduced to liberalise the UK electricity market by privatisation.
That underlying policy did not entail any requirement that those who build power generation facilities must also be those who will operate them.
The court noted that the Act contains two separate regulatory regimes - one in respect of construction of power generation plants and another in respect of their operation.
Those activities were each subject to separate regulatory regimes.
There was no regulatory gap in the system as the Scottish ministers had wide powers to impose conditions to protect the environment.
In the circumstances, there was no need to require applicants for consent to hold in advance a generating licence or an exemption.
It is, the court noted, established practice throughout the UK to apply for section 36 consents before seeking a generation licence.
The court also concluded that, even if the design statement condition were unenforceable, that would not be sufficient to invalidate the consent as a whole.
Energy and planning partner at legal firm Pinsent Masons, Gary McGovern, said: "Donald Trump will be hoping he has more success at the US ballot box than he does in the Courts. Today's decision is long overdue but is still a welcome shot in the arm for offshore wind and the wider UK renewables industry. In pursuing a weak argument described previously in the Court of Session as 'fallacious', this case has perpetuated a lingering doubt over longstanding legal principles, and that has been to the detriment of the whole energy industry.
"Developers will therefore breathe a sigh of relief and it is hoped that this and other projects affected can now gather pace, without the threat of costly legal challenges and delays on similarly dubious grounds hanging over them. Against the backdrop of the climate change agreement reached in Paris at the weekend and the contribution that renewable energy is expected to make a contribution to binding climate targets, this ruling underscores the need for a fair and efficient legal process which deals with unmeritorious claims quickly."
Trump International Golf Club Scotland Limited & Anr v The Scottish Ministers. Case Number: (2015) UKSC 74