You need to add the NextGen Custom Fields template and to create an additional gallery template (gallery-linked.php, for example) in NextGen.
First, use NextGen Custom Fields to add a “custom_link” field to your galleries, and enter the correct link URL to the field for each image.
Then create a duplicate of nextgen-gallery/view/gallery.php and name it gallery-linked.php (put the duplicate file in the same folder as the original gallery.php).
In gallery-linked.php, find the <!-- Thumbnails -->
section and add the anchor and linking code, using the content of the custom field for your URL destination. This is what my linking code looks like in gallery-linked.php file.
<a href="<?php echo $image->ngg_custom_fields["custom_link"]; ?>" target="_blank" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
<?php if ( !$image->hidden ) { ?>
<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
<?php } ?>
</a>
Hope that helps.