In answer to your title question: no, getting funding for research is not an intellectual or scholarly contribution to a paper, and on its own it is not worthy of coauthorship. This is a fairly standard position of editorial groups in academia and it is reflected in published guidelines for coauthorship. Inclusion of a purported coauthor due to their reputation, position, eminence, etc., without an intellectual contribution to the paper is considered to be "guest authorship" and is a breach of academic honesty/integrity.
The International Committee for Medical Journal Editors (ICMJE) (2021) states that "Examples of activities that alone (without other contributions) do not qualify a contributor for authorship are acquisition of funding; general supervision of a research group or general administrative support; and writing assistance, technical editing, language editing, and proofreading." (p. 3, emphasis added)
The World Association of Medical Editors (WAME) states that "Only an individual who has made substantial intellectual contributions should be an author. Performing technical services, translating text, identifying patients for study, supplying materials, and providing funding or administrative oversight over facilities where the work was done are not, in themselves, sufficient for authorship, although these contributions may be acknowledged in the manuscript, as described below. It is dishonest to include authors only because of their reputation, position of authority, or friendship (“guest authorship”)."
The present situation is complicated by the fact that Dr Y has undertaken review and revisions to the paper. You characterise this contribution as minimal, but he (and others) might not agree with this characterisation. Depending on his contribution here he might be able to mount a reasonable case for co-authorship, but this really depends on his intellectual contribution. In assessing this, you should note that even if he made few revisions, his scholarly judgment in checking the paper (including the correct parts) might have been a substantial contribution, so be careful not to equate the volume of manuscript-changes to his contribution.
One thing that is notable here that Dr X has given a justification for inclusion of authorship for Dr Y that is political rather than scholarly --- i.e., that the latter is gossipy and influential. This is a red-flag suggesting that the authorship is not warranted and is proposed to be granted only for internal political reasons within the Department. The conjunction of a minimal editing role and these kinds of (corrupt) justifications being put forward for authorship is suggestive that co-authorship might not be warranted in this case.
As to what to do, that is a decision you will need to make. There are reasonable grounds to push back here, particularly against the view of Dr X that you should grant co-authorship to avoid adverse gossip or action from an influential academic. You could discuss the matter with Drs X and Y and let them know your view that you are concerned about the possibility of guest authorship in this paper, and see if you can resolve the matter by mutual agreement. If this discussion does not assist, you could take your concerns to the ethics board at your university or to your Head of Department to get their advice. I recommend that you frame your issue as a concern about guest authorship, noting that this is a breach of academic rules. Even assuming you do this in a professional way, you should be realistic about the fact that doing the right thing here might lead to a conflict between you and Dr Y (and possibly Dr X depending on where his sympathies lie) and so you will need to decide if you are prepared for that. Since you are a tenured early-career academic, I think you are big and ugly enough to take action on possible misbehaviour at your university, so I would counsel you to follow up with your concerns to ensure that the proposed authorship is properly considered.