In Gentoo, files with the name .keep (and files with the ".keep-" prefix) are found in some directories. They should not be deleted.
These directories are necessary, but often empty, especially at their creation time. Unmerge deletes empty directories, and ".keep" files make sure these directories will be kept to remain.
More specifically, there're two variants: The files with the name .keep are created by stage tarballs.
Packages can create ".keep" files, too. In this case they will be named
(Packages have the default slot number "0".)
Packages create ".keep" files by the ebuild helper function "keepdir". See the description by:
man 5 ebuild