A good hat or visor. One size adjusts in most cases.
Needs a size — ask first
Apparel, shoes and gloves all need measurements, and golf sizing varies enough between brands that a guess is usually wrong. If you are set on clothing, a gift card to a shop with a broad range beats a guessed size.
Gloves in particular: they must be tight to work, so a generous guess produces a glove that is useless rather than merely imperfect.
They probably already have
Golf balls, unless you know the exact model played. Players are particular and most have a drawer full.
Another divot tool. Everyone has several.
Training aids. Well meant; almost never used twice.
Novelty club covers, if the recipient is a serious player. Read the room.
For someone just starting
A glove, a dozen soft balls, a towel and a hat covers everything a beginner needs and none of it requires knowing their game. Lessons are better than any object, if the relationship allows it.
If you must buy clothing
Bottoms are harder to guess than tops, and fitted styles are harder than relaxed. A neutral layer — a vest or quarter-zip — is the most forgiving apparel gift.