The European Commission has sent a "final warning" to the UK for failing to address repeated breaches of legal air pollution limits in 16 areas including London, Birmingham, Leeds, and Glasgow.
The UK is one of five countries served with the warning over persistent breaches of nitrogen dioxide levels, which come from sources including factories and vehicles, particularly diesel engines.
Air pollution is linked to the early deaths of about 40,000 people a year in the UK - and causes problems such as heart and lung diseases and asthma.
The Commission said that if the countries failed to take action on the issue within two months, it may decide to take the matter to the European Court of Justice.
European Commission spokesman Enrico Brivio told a briefing in Brussels: "It is a warning that we send to member states asking to comply, to take measures to fight this poor air quality that provokes respiratory disease and cardiovascular disease.
"It is an important factor on the health of citizens.
"So we ask the UK, as the other four member states, to take appropriate measures to fight this type of air pollution and we hope they comply."
Asked whether the UK would remain bound by any legal proceedings after Brexit, Commission spokesman Alexander Winterstein said: "For as long as the UK is a member of the European Union, rights and obligations apply.
"European law applies fully."
The warning comes as campaigners ranging from health workers to environmentalists ramp up calls for the Government to take action on air pollution, demanding a new Clean Air Act and a crackdown on diesel vehicles.
According to the European Commission, road traffic is responsible for around 40% of emissions of nitrogen oxides in the EU, with the contribution at ground level much higher.
Around four fifths of nitrogen oxides which come from traffic come from diesel-powered vehicles, the Commission said.
Jenny Bates, Friends of the Earth air pollution campaigner, said: "It's shameful that the EU has to take legal action against the UK government to get it to deal with the dangerous levels of dirty air across the country.
"Air pollution is responsible for tens of thousands of early deaths every year and is harming the health of an entire generation of children.
"Current government plans have been shown to be too little too late."
She called for Government funding of clean air zones in pollution hotspots and for a Clean Air Act to protect the public from poor air quality after Brexit, when the UK could no longer rely on EU air quality rules and courts to push for action.
The 16 areas were meant to meet legal limits for nitrogen dioxide by 2010, but the Government has admitted it could be 2020 before air quality levels are within the rules for some areas and 2025 for London.
The Government has repeatedly been taken to court by environmental law firm ClientEarth, whose chief executive James Thornton said: "The action today by the EU Commission is a reminder of just how serious a problem the UK has with air pollution.
"Our High Court victory against the Government in November of last year means ministers have to produce draft plans by April 24 to clean up our air as soon as possible.
"With this final warning from the Commission, the Government is under pressure from all sides to stop dithering and act decisively to meet its moral and legal obligations to clean up our unhealthy air."
A spokesman for the Government said ministers were "firmly committed" to improving UK air quality and cutting harmful emissions.
"That's why we have committed more than £2 billion since 2011 to increase the uptake of ultra-low emissions vehicles and support greener transport schemes and set out how we will improve air quality through a new programme of Clean Air Zones.
"In addition, in the Autumn Statement, we announced a further £290 million to support electric vehicles, low emission buses and taxis, and alternative fuels.
"We will update our air quality plans in the spring to further improve the nation's air quality."