It’s been a while since you posted this. Don’t know if you already got this. If you haven’t, here’s a snip that may help you
$args = array(
'post_type' => 'attachment',
'numberposts' => -1, // bring them all
'post_status' => null,
'post_parent' => $post->ID // post id with the gallery
);
$attachments = get_posts($args);
There. $attachments now is an Array of objects containing all the post attachments. You may add an extra arg stating that you want only images (because you can attach videos too).
Hope this helps.
Cheers
Ricardo Valfreixo
minimalistic studios