The court overturned an earlier decision, which backed an appeal by the Royal Society for the Protection of Birds (RSPB).
The RSPB had claimed the government failed to properly consider the environment impact of 2.3GW of offshore capacity.
Mainstream Renewable Power, the developer behind Neart Na Gaoithe, has welcomed the announcement to overturn the initial ruling.
"We welcome the ruling of the Inner House of the Court of Session in favour of Scottish ministers, overturning last year's decision by Lord Stewart.
"We have worked closely with a range of partners on the project, including the RSPB, and we look forward to continuing to do so as we take the development forward.
"This is a major step forward for Neart na Gaoithe, which is the only project out of the four offshore wind projects in the Forth and Tay to hold a contract for difference (CfD)," said Mainstream Renewable Power's offshore manager for Scotland, David Sweenie.
In March 2017, an arbitration tribunal backed Mainstream in its dispute with the Low Carbon Contracts Committee (LCCC) over the removal of the CfD subsidy.
The LCCC is responsible to managing the UK's CfD process on behalf of the UK government.
In March 2016, the LCCC issued a notice terminating the deal, stating the project had missed milestones set out in the CfDs.
However, Mainstream disputed this, arguing it had entered arbitration with the LCCC prior to the notice because the project was caught up in the judicial review.