Go into Settings > Apps (or maybe "App Manager" on a Samsung), select the Gallery app, and there should be information about whether it has any "defaults set". If it has, try clearing that.
I think that is more likely than something in the message app's settings, but if it doesn't work then the message app's settings are the other place to look.
(I don't have a Samsung phone, so can't check that app's settings myself).