WP_LOCALIZE_SCRIPT doesn’t work

You have to use the correct handle:

wp_localize_script('page_data', 'glr_dt', $gallery_js_data_array);

// Edit
Your code is also wrong. What do you want to do in this line:

'maxPages' => '$gallery_max_load = $gallery->max_num_pages;'

You are assigning a string to maxPages.

I guess you want it that way (or similar):

'maxPages' => $gallery->max_num_pages,

Now, you can access the var in your JS as glr_dt.maxPages