You could use the get_post_galleries_images
function, which returns an array of all the galleries from whatever post ID you specify. The following is a quick function that will display all the images:
function na_get_gallery_image_urls( $post_id, $number = false ) {
$post = get_post($post_id);
$count = 0;
// Make sure the post has a gallery in it
if( ! has_shortcode( $post->post_content, 'gallery' ) )
return;
// Retrieve all galleries of this post
$galleries = get_post_galleries_images( $post );
// Loop through all galleries found
foreach( $galleries as $gallery ) {
// Loop through each image in each gallery
foreach( $gallery as $image ) {
if ( $number == $count )
return;
echo '<img src="'.$image.'">';
$count++;
}
}
}
If you put that in your functions.php file, you could then call the function with the ID like this: na_get_gallery_image_urls(128).