The case came before the ECJ because of a judgement made by a lower European Union court in 2014, which annulled a decision made 13 years previously to list Hamas as a terror group.
In December 2014, the General Court said Hamas should be removed from the list because the EU's decision to place it on the "terror" sanctions list was not the result of an independent investigation.
The court's ruling maintains the asset freezes and travel ban imposed on Hamas members, and prevents it from receiving funds from European NGOs.
The EU second highest court ordered Hamas be removed from the terrorist blacklist because their listing had been based on media and internet reports, rather than on a fact-based legal ruling.
Tally Helfont, director of the Foreign Policy Research Institute's Programme on the Middle East, said that Hamas has not taken any actions that would warrant its removal from the European Union terrorism blacklist.More news: Daughters-in-law from Pakistan always welcome: Sushma Swaraj
However, the ECJ said that a decision by a competent authority was only required for an initial listing, with no such condition for subsequent retention. "To respect the ruling, the EU must now immediately suspend its deals with Australia and the United States", the NGO European Digital Rights said in a statement.
The lower court's ruling had triggered a furious reaction by Israeli diplomats and some leaders of Jewish organisations and communities. "The EJC has thus confirmed the legality of those listings", said Lars Faaborg-Andersen, the EU's ambassador to Israel. In the meantime, Hamas will remain blacklisted by the EU.
"This means that the LTTE remains listed as a terrorist organisation by the European Union", the statement added. However, the document did not replace the group's 1988 charter, which explicitly calls for Israel's destruction and violence against Jews worldwide.
Neither Hamas nor Israel had an immediate reaction.