The General Court of the European Union said the Commission had failed to follow the bloc's rules when approving the Amflora potato, which is genetically modified to produce extra starch for use in the paper industry.
While Amflora is no longer grown in Europe - BASF withdrew the product in 2012, citing opposition to the technology - the ruling raises new concerns about the EU's complex and much-criticised approval system for GMO crops.
"Because the Commission significantly failed to fulfil its procedural obligations, the General Court has annulled the contested decisions," the court said in a statement.
The Commission and BASF were not immediately available for comment.
The surprise approval of Amflora was one of the first decisions taken by the EU's then-health commissioner, John Dalli, who took office in February 2010. Dalli was forced to resign from the Commission last year after being linked to a tobacco bribery scandal.
It was only the second time a genetically modified plant had been approved for cultivation in Europe, and prompted an angry response from environmental campaigners and consumer groups who strongly oppose the technology.
It also led to a legal challenge against the decision by Hungary, supported by other EU countries opposed to GMOs, including France, Austria and Poland.
The Commission first proposed the cultivation and sale of Amflora in 2007, following a positive scientific assessment by the European Food Safety Authority (EFSA).
Following the failure of EU government ministers and officials to approve or reject the proposal, the Commission exercised its power to grant approval unilaterally in 2010.
But in its judgment, the General Court said that following the publication of an updated scientific opinion by EFSA in 2009, the Commission should have submitted new proposals for approval by EU governments rather than simply adopting its 2007 version.
"The Commission infringed the procedural rules of the systems for authorising GMOs in the European Union," the court concluded.
Currently, only one GMO crop is grown commercially in Europe - an insect-resistant maize developed by Monsanto. It is sown on about 100,000 hectares (247,000 acres) of farmland, mainly in Spain.
That level is dwarfed by an estimated 170 million hectares of GMO crop cultivation globally, mainly in the Americas and parts of Asia.
While repeated EU scientific assessments have concluded that GMO crops are as safe for humans and the environment as their conventional counterparts, consumer opposition to the technology in Europe remains strong.