Hi @buylov
You can create a post object field and then call it like this:
<?php
$galleyPost = get_field('photo', 'post_gallery_field_name', false);
$image_ids = get_field('photo', $galleyPost, false);
$shortcode = '[gallery ids="' . implode(',', $image_ids) . '"]';
echo do_shortcode( $shortcode );
?>
Keep in mind that I haven’t tested it yet.
I hope this helps.