The installed pamd file for gentoo is NOT compatible with Gentoo PAM standards (not anymore, or in the last two years at least). Copy over the version from shadow (4.0.18.2), and use that instead; I'd also suggest adding a new revision with KEYWORDS="" that uses the one from 4.0.18.2-r2 (depending on the correct version of pambase as shadow does), so that it's already prepared for the new pambase support.
Good, I'll have a look at this asap. Thanks for the heads up...
Added new revision with updated PAM file. Reopen if you want this to go stable before closing...