Only people who have made a "significant scientific contribution to the content of the paper".
In particular, getting a grant, employing someone, or being a lab director does not justify co-authorship.
I have observed that the issue cuts both ways with regard to seniority. It is not just senior people demanding to be co-authors. Sometimes it is junior people putting a senior person as co-author to try and "curry favour" with them or in the hope that it will increase the likelihood of publication.
Here are two frank and helpful articles in Nature Materials which discuss some of the relevant issues.
Authorship without authorization (2004)
Authorship matters (2008)
Like a lot of things, problems may be avoided if there are open discussions before employment or a collaboration begins.
Sometimes co-authorship may be a "grey issue". What constitutes a "significant contribution" can be highly subjective. But I fear there are too many cases of unjustified co-authorship.
I welcome comments and stories.