French President Emmanuel Macron announced an enforced lockdown, a step similar to curbs imposed by Italy and Spain, saying: "We're in a health war".
Mr Macron also said the European Union's external borders would be closed to travellers from Tuesday.
In Germany, most non-grocery shops and venues have been ordered to shut.
Chancellor Angela Merkel also banned religious services and told people to cancel any domestic or foreign holiday travel. Schools across the country have already been shut.
In the UK, Prime Minister Boris Johnson did not announce compulsory restrictions but urged people to avoid pubs and clubs and refrain from non-essential travel or having contact with others.
Earlier, the head of the World Health Organization (WHO), Dr Tedros Adhanom Ghebreyesus, said governments were not doing enough to combat the pandemic, and urged them to step up their testing programmes.
"You can't fight a fire blindfolded and we can't stop this pandemic if we don't know who is infected," he said at a news conference in Geneva. "We have a simple message for all countries: test, test, test."
There have been more than 174,000 confirmed cases of coronavirus globally and over 6,700 deaths, according to a tally from Johns Hopkins University.
In a televised evening address, President Macron ordered people to stay at home and only go out for essential duties. He said the previous measures, including the closing of schools, cafes and non-essential shops, had proved insufficient.
"Even while medics were warning about the gravity of the situation, we saw people get together in the parks, busy markets and restaurants and bars that did not respect the order to close," he said in the 20-minute address.
The restrictions will be in place for at least 15 days, Mr Macron added, vowing to punish any infringement. He also said the army would be used to help transport the sick to hospital and that the second round of local elections due this weekend was being postponed.
On Monday, the head of the country's health service, Jerome Salomon, said the outbreak was "very worrying" and "deteriorating very fast". France has so far registered more than 6,000 infections and 148 deaths.
The country will close its land borders from midday (11:00 GMT) on Tuesday, when the EU's external borders and the Shenghen borderless zone will also be shut, Mr Macron said.
Under a proposal announced by the European Commission earlier, non-essential foreign travel would be banned for 30 days. Long-term residents, family members of EU nationals and diplomats would be exempt as well as cross-border and healthcare workers and people transporting goods.