I have noticed that if I have a query where posts_per_page are set to 4, any (image) gallery that belongs to one of those posts will too have only 4 items (although when I create the gallery from Add new post the gallery has 10 images).
How can I fix this?
You need to post the query code of both the post query and the gallery query; no one can really make a guess otherwise.
You can try using
<?php wp_reset_query(); ?>
after the post query to force a reset.See http://codex.wordpress.org/Function_Reference/wp_reset_query