Unexpected end of file

You arent closing your if tag:

$tags = wp_get_post_tags($post->ID);
if ($tags) {
    echo 'Related Posts';
    $first_tag = $tags[0]->term_id;
    $args_related = array(
        'tag__in' => array($first_tag), 
        'post__not_in' => array($post->ID), 
        'posts_per_page' => 10,
        'caller_get_posts' => 1
    );
    $related_articles_query = new WP_Query($args_related);
}