That usually is a sign that the SD card is corrupted or damaged. Can you see the contents in the File Explorer? Are the pictures still visible? If you open the SD Card in a computer, can you see the files?
I'd strongly suggest that if you still see the pictures (just not in the Gallery), you back them up in a computer or Cloud storage ASAP. Then try formatting the SD card again.
In my experience, SD cards are not very reliable, and I'm not sure if Samsung doesn't know how to do SD Cards properly, but my Note 2 fried 2 cards, a friend's S3 damaged one, my S4 damaged one, and the Note 3 damaged yet another one. I'm done using SD cards with my devices (all Samsung so far).