The leaders, meeting by a conference call, agreed to close off a region encompassing 27 countries and more than 400 million people.
Exceptions will be made for European citizens and residents coming home, although some countries were asking them to self-isolate for two weeks, in some cases away from their families. Medical professionals and scientists will also be exempt.
We are prepared to take all the necessary measures and we will not hesitate to take additional measures in accordance with new developments, said the president of the European Commission, Ursula von der Leyen.
Our enemy is the virus and we have to do everything to protect our people and our economies, she added.
The Commission president also said it was necessary to urgently lift blockades at internal borders at which too many people have been stuck.
European Council President Charles Michel confirmed that a regular EU summit scheduled to be held in Brussels on March 26 and 27 would not be held and instead the EU leaders would hold a video conference.