Under the agreement, bonuses will be capped at a year’s salary, but can rise to two year’s pay if there is explicit approval from shareholders.
The UK, which hosts Europe’s biggest financial services centre, was opposed to any caps on bank bonuses.
Prime Minister David Cameron said the EU should concentrate on tightening up banks in other ways.
“We are absolutely clear that we must be able to implement the Vickers plan in the UK, which in some ways is tougher than regulations that are being put in place in other European countries.
“We want to have this proper ring fence between retail banks and investment banks and the rules must allow that to happen.”
The Vickers plan, based on the Independent Commission on Banking report led by Sir John Vickers, is designed to keep saver and business deposits from being compromised by the more speculative activities typically undertaken by investment banking operations.
London argues the EU’s bonus rules would drive away talent and restrict growth in the financial sector.
The UK had been trying to rally other governments in the 27 countries in the EU behind its position.
Top bankers and financial traders can earn bonuses multiple times their base salaries. But there has been public outrage over bonuses following the huge bail-outs of banks.
The agreement was reached during eight hours of intense talks in Brussels between members of the European parliament, the European Commission and representatives of the bloc’s 27 governments.
Othmar Karas, the European Parliament’s chief negotiator, said: “For the first time in the history of EU financial market regulation, we will cap bankers’ bonuses.
“The essence is that from 2014, European banks will have to set aside more money to be more stable and concentrate on their core business, namely financing the real economy, that of small and medium-sized enterprises and jobs.”
But Joe Rundle, head of trading at ETX Capital, in London, said the cap would backfire. He told the BBC: “It will drive up fixed salaries to compensate. Businesses that do not need to be inside the European Union will leave. And when banks invest in future divisions, it will be outside the EU.”
The deal paves the way for Basel III, an overhaul of banking rules.
The G20 group of rich nations had originally planned to bring in Basel III last month, but that has been delayed to January 2014.
Basel III focuses on a ratio of high-quality capital – called tier 1 – which is needed to cushion it against any future shocks. It will rise to 9% after the rules come into effect.
Once the proposals are formally agreed it will start the biggest shake-up of the banking system since the global financial crisis.
The lack of solid financial cushions meant that many banks were vulnerable, and eventually required taxpayer-funded bailouts to avoid bankruptcy.