At that level, it's generally known to be the mental preparation for the given day (along with a bit of luck, as you mentioned).
Indeed, everyone at that level has already been filtered and selected for similar top levels of skill, knowledge, conditioning, equipment, diet, coaches, etc., etc., etc. It comes down to the mental game both internally and between competitors on that particular day.
A classic book to understand some of this is The Inner Game of Tennis by Timothy Gallwey [0]
Source: I formerly competed at international levels for several years in alpine ski racing (mostly DH/Super-G), and studied neuroscience in college as a result of the many fascinating mental phenomena I found in training and competing.
One very interesting fact I came across in neuroscience is that perceptual thresholds for relevant senses, e.g., touch sensitivity for a musician, are about 10X finer than normal people (i.e., they can detect physical differences only 10% the size of that detectable by normal population), and that this is trainable. So yes, this is definitely on the skill/ training side, agreeing with the author.
OTOH, I know some top level musicians who quickly point out that the people with insane levels of desire, motivation, and hard work who will never get to the level to pass a professional audition. But I haven't further data to see what is the issue (does it come to talent, or some genetic shortcoming in their sensory-motor systems, or have they self-sabotaged, or what 20 other factors?)
[0] https://www.amazon.com/Inner-Game-Tennis-Classic-Performance...