Add the snippet below to your themes functions.php file to get an excerpt of a WordPress post by ID

function get_excerpt_by_id($post_id){
    $the_post = get_post($post_id);
    $the_excerpt = $the_post->post_content;
    $excerpt_length = 32;
    $the_excerpt = strip_tags(strip_shortcodes($the_excerpt));
    $words = explode(' ', $the_excerpt, $excerpt_length + 1);
    if(count($words) > $excerpt_length) :
        array_pop($words);
        array_push($words, '…');
        $the_excerpt = implode(' ', $words);
    endif;
    $the_excerpt = '' . $the_excerpt . '';
    return $the_excerpt;
}

Usage example:

$excerpt = get_excerpt_by_id($post_id);