Before the marshmallow update I could easily hide some folders on the gallery app. Now with the marshmallow they changed this functionality to lock files. The problem is that large files take too long to lock and when the screen goes off during the process it simply doesn't not lock the file!
What you can try as an alternative is to locate the file/folder using File Manager or File Explorer. Then simply rename the file. Just add a dot at the beginning of the file name, and that file/folder will be changed to a hidden file/folder.