But the Civil Aviation Authority took legal action over the refusal.
The government body argued that passengers were entitled to compensation under EU law.
The industrial action in 2018 saw disruption across European airports, with some customers forced to cut short holidays or pay for alternative flights to return home.
Commenting on the judgement, Paul Smith, director at the UK Civil Aviation Authority, said: “Ryanair has refused to pay compensation to passengers affected by industrial action taken by its pilots in 2018.
“The High Court has today agreed with our interpretation of the law.”
As Ryanair has the right to seek to appeal the judgment, the CAA added affected customers should await further information before pursuing their claims.