The surprise announcement by GM on Tuesday dealt a blow to German Chancellor Angela Merkel as she visited Washington after having backed the move to sell Opel to a venture led by Canada's Magna as the best way of saving jobs in Germany.
Berlin reacted with dismay and Merkel has asked that her cabinet meet on Wednesday.
"The German government regrets the decision," government spokesman Ulrich Wilhelm said in a statement.
Merkel's government had backed Magna's offer as embodying the best future for 25,000 workers on German territory.
German Economy Minister Rainer Brüderle called GM's U-turn "totally unacceptable" on Wednesday ahead of a cabinet meeting in Berlin.
Brüderle said Berlin urgently wanted to see GM's restructuring plan, adding that the company needed the support of the workers if they wanted the firm to recover.
"This is unacceptable for the employees eight weeks before Christmas," he said.
Roland Koch, head of the Hesse regional government, where Opel has its biggest plant, said he was "shocked and at the same time angry that the months-long efforts to find the best possible solution for Opel have failed at GM."
The company said its board made the decision because of "an improving business environment for GM over the past few months, and the importance of Opel/Vauxhall to GM's global strategy." Britain has 4,700 workers at two plants at Opel's Vauxhall operations.
The GM board "has decided to retain Opel and will initiate a restructuring of its European operations in earnest," GM said in a statement.
The announcement was the latest twist in a saga that has led to months of uncertainty for Opel after its struggling US parent company underwent a government-backed bankruptcy reorganization.
The European unit, which was to be shed under the plan, turned into a major controversy as governments in Europe and the United States clashed over which portions of the automaker would be saved and what types of aid would be offered.
GM said it now believes keeping Opel and restructuring the European division itself would be the most cost-effective solution, noting it would soon present its restructuring plan to Germany and other governments.
"From the outset, our goal has been to secure the best long-term solution for our customers, employees, suppliers and dealers, which is reflected in the decision reached today," said president and chief executive Fritz Henderson. "This was deemed to be the most stable and least costly approach for securing Opel/Vauxhall's long-term future."
Germany hoped GM would "strengthen the performance of the Opel unit," and "limit the inevitable adaptations to the bare minimum" - a euphemism for job cuts, Wilhelm said.
But GM's Henderson said the restructuring costs had been estimated at $4.4 billion, "significantly lower than all bids submitted as part of the investor solicitation."
He vowed to work with European labour unions "to develop a plan for meaningful contributions to Opel's restructuring."
GM had given preliminary approval to plans to sell a 55 percent stake in German-based Opel to Canadian firm Magna and its Russian partner Sberbank.
Magna's co-chief executive officer Siegfried Wolf, in a sober statement, said "we understand... it was in GM's best interests to retain Opel."
European Union regulators last month had cast doubt on the deal, saying there were "significant indications" that German aid of €4.5 billion for the deal had been proffered only if Magna and Sberbank won the bid, which had been bitterly contested.
The latest news was unlikely to end the polemic. Reiner Einenkel, works committee chief at Opel's factory in Bochum, Germany, said GM's decision created "a difficult situation for employees."
"GM needs money to keep Opel running and we'll make sure the government provides the means to protect Opel facilities," he told AFP.
GM's announcement came just as Merkel left Washington, where she held talks with President Barack Obama and addressed the US Congress.
The saga has dragged on since February, with the fate of at least 10,500 of GM Europe's workforce of around 50,000 hanging in the balance. That is the number of jobs Magna said it would cut, while GM is believed to eliminate more as part of its restructuring.
GM's finances since its bankruptcy reorganization have not yet been reported. But on Tuesday it said US sales were 177,603 new vehicles in October, up four percent from a year ago, the company's first year-over-year gain since January 2008.