Photo gallery with Featured Images

$query = new WP_Query(array('posts_per_page' => 6, 'meta_key' => '_thumbnail_id'));
while($query->have_posts()) :
    $query->the_post();
    the_post_thumbnail();
endwhile;

This code gets 6 latest posts which have featured image available & show those 6 images on the page. It will skip those posts where there is no featured image set even if they are newer.

This will probably get you started. You should read the codex pages for WP_Query & the_post_thumbnail