The move is likely to anger Russia which has opposed the prospect of Ukraine joining and becoming closer with the West.
Ukraine applied less than a week after it was invaded in February and its candidacy has been fast-tracked.
More on Ukraine
European leaders approved the move at a special summit in Brussels.
Ms von der Leyen said the decision “strengthens Ukraine, Moldova and Georgia, in the face of Russian imperialism. And it strengthens the EU. Because it shows once again to the world that we are united and strong in the face of external threats.”
Moldova’s president, Maia Sandu, also hailed a historic moment for her tiny landlocked nation – which borders Ukraine.
She said there was a “difficult road ahead” but that it offered “more prosperity, more opportunities and more order”. The country is among the poorest in Europe.
Georgia also on road to become candidate
European Council President Charles Michel tweeted that a third country was also taking steps to join the union, the former Soviet state Georgia.
He said the council had recognised “the European perspective of Georgia and is ready to grant candidate status once the outstanding priorities are addressed”.
“Congratulations to the Georgian people. A historic moment in EU-Georgia relations: Georgia’s future lies within the EU,” he said.
Candidates must meet standards on the state of their economy and political sphere, including a commitment to the rule of law and other democratic principles.
Ukraine will have to cut government corruption and enact other reforms.
It’s unclear how long the process will take. Turkey, for instance, got candidate status in 1999 but its application has been held up by various disputes.
The three countries “all have work to do before moving to the next stage of the process”, said Ms von der Leyen, adding that she knows “they will move swiftly”.
If a country joins the EU it is protected by a treaty clause that requires other members to help if it’s attacked.
Ukraine also aspires to join the NATO, which is separate to the European Union, but that’s currently a remote prospect and President Putin has demanded it never be allowed to become a member of the military alliance.