If post has custom field then display css-class

You most probably ran into problems with escaping code and HTML from each other.

Try this (added line breaks just for better readability):

<i class="
    <?php 
         echo (get_post_meta(get_the_ID(), 'Preis', true) != '') ? 
          'fa fa-check' : 'fa fa-times';
    ?>
">

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)