The 27 other leaders looked on in awkward silence as Trump suggested most NATO countries were freeloaders not paying their share for military protection.
Merkel expressed dismay about an increase of violations of the arms truce since Easter.
The final result was decided by a 50/50 combination of jury and public votes.
All countries qualified for the Eurovision Song Contest's Grand Final, which is scheduled for May 13, have become known after the second semi-final on May 11.
The meeting between German Chancellor Angela Merkel and Russian President Vladimir Putin in Sochi has great significance.