WordPress stores the images as attachment post type, so it is possible to add the title to each of your gallery images.
For example,
// $filename should be the path to a file in the upload directory.
$filename="/path/to/uploads/2013/03/filename.jpg";
// The ID of the post this attachment is for.
$parent_post_id = 37;
// Check the type of file. We'll use this as the 'post_mime_type'.
$filetype = wp_check_filetype( basename( $filename ), null );
// Get the path to the upload directory.
$wp_upload_dir = wp_upload_dir();
// Prepare an array of post data for the attachment.
$attachment = array(
'guid' => $wp_upload_dir['url'] . "https://wordpress.stackexchange.com/" . basename( $filename ),
'post_mime_type' => $filetype['type'],
'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $filename ) ),
'post_content' => '',
'post_status' => 'inherit'
);
// Insert the attachment.
$attach_id = wp_insert_attachment( $attachment, $filename, $parent_post_id );
You can set your each gallery images Title as post title and can get the title using simple post function “get_the_title($your_attachment_id);”.
For more details,
example link
Hope this will help you.