After adding the image to the media gallery using this code ...
$product->addImageToMediaGallery($imageFile, array('image','thumbnail','small_image'), false, false);
... get the media_gallery array from the product, and then add the last added image and there you can set the label.
After that, you can return it back to the media_gallery image media_gallery , here is the code:
$gallery = $product->getData('media_gallery'); $lastImage = array_pop($gallery['images']); $lastImage['label'] = $image_label; array_push($gallery['images'], $lastImage); $product->setData('media_gallery', $gallery); $product->save();
source share