The ruling is final and allows no scope for appeal.
Costly spectrum
The auction of 3G spectrum - enabling firms to offer video and internet services through handsets - raised more than £22bn for the British government.
The plaintiffs, which also included O2 and T-Mobile, argued that they were entitled to recover tax since their customers were the ultimate beneficiaries of the deal.
But the European Court of Justice (ECJ) ruled that the award of licences, in itself, did not constitute an economic activity on which tax was paid.
"What is at issue is the activity of controlling and regulating the use of electromagnetic spectrum," the ruling stated.
"The court holds that such an activity constitutes a necessary precondition for the access of economic operators to the mobile telecom market."
The enormous cost of licences, problems with their introduction and underwhelming consumer demand has meant many firms have incurred heavy losses on their investment.