The European Commission says it has decided that both types of energy can classify as "sustainable investment" if they meet certain targets.
But the move has divided the EU, and been fiercely opposed by some members.
Austria's chancellor responded to the news by saying "nuclear power is neither green nor sustainable".
"I cannot understand the decision of the EU," Karl Nehammer said.
He said he would back his environment minister, Leonore Gewessler, in pursuing legal action at the European Court of Justice if the plans go ahead.
"This decision is wrong," Ms Gewessler said. "The EU Commission today agreed its greenwashing programme for nuclear energy and [the fossil fuel] natural gas."
Luxembourg has also said it will join in legal action.
The EU has set itself a goal of becoming climate neutral by 2050 and the Commission argues that to get there, a great deal of private investment is needed. Its proposals are meant to guide investors.
Spain, too, has strongly objected to the idea which was debated for months before being formally proposed on Wednesday.
But those objections are balanced by support from nuclear-using nations such as France. Nuclear energy involves fewer carbon emissions but has different safety concerns and requires disposal of dangerous waste.
Classifying natural gas as "sustainable" also has supporters who argue that some countries which still rely on coal for energy - such as Poland - would benefit from incentives to move to a relatively cleaner supply.
Germany, a powerful country in EU politics, relies heavily on gas in its own energy mix though its environment minister, Steffi Lemke, has criticised the plans.
EU officials were keen to stress that the change was not a requirement for any state or company to invest in gas or nuclear.
It is instead a highly technical set of rules, called the "EU Taxonomy", about what classifies as "sustainable" so that private investors can decide where to put funds, the commission says.
It also regulates what can be said to be environmentally friendly, so that climate-conscious investors can make informed decisions.
The list is supposed to recognise green projects that make a "substantial" contribution to at least one of the EU's environmental goals, "while not significantly harming any" of them.
Commission officials point to the strict limits on what qualifies. For example, natural gas generation is under a strict CO2 emissions limit, and a requirement to switch to low-carbon gas by 2035. Nuclear power, meanwhile, must be in countries with clear plans and funding for dealing with nuclear waste.
Critics, however, have accused the EU of so-called "greenwashing" - precisely what it says its classification system is supposed to avoid.
But the decision to label both controversial industries as "green" is not yet final.
In addition to the threat of legal action from Austria and Luxembourg, the European Parliament and the council of heads of state have four months to consider the suggestion and object to it.
The bar is, however, relatively high. In order to block the commission's proposed plans, either a majority of parliament members or at least 20 of the 27 national leaders are needed.
Green parties, which together with independents and others form one of the main power blocs in the European Parliament, are fiercely campaigning against the plan.
But European Commissioner Mairead McGuinness said "we need to use all the tools at our disposal" to reach the climate-neutral target.
Private investment was "key", she said, and the proposals were "setting out strict conditions to help mobilise finance to support this transition, away from more harmful energy sources like coal".