custom template display 3 columns

Check with below code you need to start that grid-container div before while loop as like below:

<?php get_header(); ?>
<?php
$args = array(
    'post_type'=> 'movie'
);

$the_query = new WP_Query($args); ?>

<?php if ( $the_query->have_posts() ) : ?>
<div class="grid-container">
    <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
            <div class ="column">
            <div class="img_gallery">
            <?php the_post_thumbnail(); ?></div
            <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
            
            </div></div>

    <?php endwhile; ?>

    <?php wp_reset_postdata(); ?>

    <?php endif; ?>
</div>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

try with you get result what you wants.