I have heard of this happening when people had corrupt or otherwise incompatible media files on SD or USB drives. It could also be some corrupt files somewhere within the internal "sdcard" folder.
On the options below, if the first item (unplugging external storage devices) does not work, I'd probably actually start with the last item (factory data reset), because it is so easy and typically effective for many problems, but that depends on your preference.
A few options to try (one of the following may work):
--remove sd cards and usb flash drives (or other usb media)
--remove media files from the internal sdcard folder
--put a file named .nomedia in top level folders if you do not want to remove files. If you do that, you may also have to clear data and cache on the Media Storage service and Gallery service under Setting/Apps.
--Backup data that you really need to keep, store it in a safe place off of your tablet, and then perform a factory data reset. Be careful copying files back in so you don't cause the problem again.