In the latest in a series of rulings that has angered Washington, Brussels said the world's most valuable company avoided tax bills on virtually all its profits in the bloc under its arrangements with Dublin.
Apple and the Irish government immediately said they would appeal against the European Commission ruling, while the US Treasury said it could undermine its economic partnership with the EU.
Ireland has been seeking to attract multinationals by offering extremely favourable tax conditions, known as sweetheart deals, but EU Competition Commissioner Margrethe Vestager said Apple's broke EU laws on state aid.
"This is not a penalty, this is unpaid taxes to be paid," Vestager added.
More From This Section
The tax repayment order -- by far the largest in EU history -- follows a three-year inquiry into whether Dublin's tax breaks for Silicon Valley titan Apple were against the law.
Apple has had a base at the southern city of Cork since 1980 and employs 5,000 people in Ireland, through which it routes its international sales, avoiding billions in corporation taxes.
Apple as a result paid an effective corporate tax rate of 0.005 per cent on its European profits in 2014 -- equivalent to 50 euros for every million, Vestager added.
Tensions have been growing between Washington and Brussels over a series of anti-trust investigations targeting companies such as Apple, Amazon, Starbucks and Fiat Chrysler.
Apple said "we will appeal and we are confident the decision will be overturned."
Irish Finance Minister Michael Noonan said the decision "leaves me with no choice but to seek cabinet approval to appeal the decision before the European Courts".
The Apple tax bill dwarfs the previous EU record for a state aid, the 1.3 billion euros received by the Nurburgring race track from German authorities.
The US stepped up its rhetoric ahead of the decision, accusing the European Commission of unilateralism and overstepping its mandate.