It depends on the package, and the package maintainer.
AFAIK, the policy is to put the packages as vanilla as possible, but some times trivial patches are needed to adjust to the distro init system, the fs layout or the package manager.
In some packages you can find a "vanilla" USE flag that serves this purpose. Other USE flags for concrete packages might influence how the code is patched (or not).
For the kernel you have a separate package. The regular Gentoo patched kernel is "gentoo-sources", while the vanilla sources as from kernel.org are called "vanilla-sources".