The judgement upholds the court's 2009 ruling, which was challenged by a group of airlines including BA and Easyjet.
Passengers will be able to claim compensation of between 250 euros ($324; Â£204) and 600 euros, depending on the flight distance.
Compensation will not be due in "extraordinary circumstances".
The court did not specify what those might be, other than saying those circumstances that were beyond the control of the airline.
European regulations introduced in 2004 oblige airlines to pay compensation to passengers for certain cancellations and delays.
A further ruling by the ECJ in 2009 confirmed that delayed passengers should be treated as if their flights had been cancelled, if the delay was longer than three hours.
Prior to this, passengers had only been able to claim for meals, refreshments, two free telephone calls and, for an overnight delay, hotel accommodation and transfers to and from the hotel.
However, some airlines refused to obey this judgement and an appeal by a group of airlines and travel organisations - BA, Easy Jet, TUI Travel and the International Air Transport Association - persuaded the English High Court to refer the matter back to the ECJ in August 2010.
Airlines must pay compensation to passengers who are delayed by three hours or more, the European Court of Justice (ECJ) has ruled.