Yeah, I'm having the exact same problem, but I'm trying to recover from it without resorting to the factory reset (I'm not keen on reloading and reconfiguring everything).
"Clear data" didn't seem to help or do anything. I rebooted after clearing data, and the Gallery still closes immediately after attempting to open.
I tried to use an app called ".Nomedia Manager" (StudioKUMA?) and it listed where I had manually copied the .nomedia files. I manually deleted those entire directories, and then tried to open the Gallery. It now shows a "Loading Media Files" screen but after 2 hours nothing has yet to appear. I don't know if that means it's re-indexing any graphics files on my phone or stuck in some endless loop. Whatever it's doing, it killing my battery so I've plugged it in to keep it charged while it's doing it's thing.
Any other suggestions?