The leisure group had planned to split Costa and list it as a separate entity, following pressure from activist investor Elliott.
But in a statement this morning, the company said a sale of the coffee chain is now “in the best interests of shareholders”.
Proceeds of the deal will be used to pay down debt and boost the pension fund.
Coca-Cola president James Quincey welcomed the acquisition, saying: “Costa gives Coca-Cola new capabilities and expertise in coffee.
“Our system can create opportunities to grow the Costa brand worldwide.
“Hot beverages is one of the few remaining segments of the total beverage landscape where Coca-Cola does not have a global brand.
“Costa gives us access to this market through a strong coffee platform. I’d like to welcome the team to Coca-Cola and look forward to working with them.”
Whitbread’s chief executive Alison Brittain said the group will now focus on its Premier Inn hotel chain in the UK and Germany.
She said: “This transaction is great news for shareholders.
“It recognises the strategic value we have developed in the Costa brand and its international growth potential and accelerates the realisation of value for shareholders in cash.
“This combination will ensure new product development, continued growth in the UK and more rapid expansion overseas.”
Whitbread acquired Costa in 1995 for £19 million from founders Sergio and Bruno Costa when it had only 39 shops.
Costa is now present on most British high streets, with 2,422 outlets across the country and a further 1,399 in international markets.
It recently expanded into China after growth in Britain became harder to find in a market bursting with rival chains such as Starbucks and Caffe Nero.
The deal comes hot the heels of another big-money acquisition in the sector.
In May, Bridgepoint sold coffee shop chain Pret a Manger to an investment fund of Germany’s billionaire Reimann family for £1.5bn.