Thursday's ruling will be a relief to around one million travelers whose plans were threatened by the walkout, which had been due to start Tuesday.
The court has backed BA's claim that the ballot of around 13,000 workers by the Unite labor union was illegal because it included members no longer employed by the airline.
That means Unite must call off the strike. It can hold another ballot, but not until after Christmas.