Yes, it can and often does. Though as I point out, IME, whether it’s innocent curiosity or gatekeeping is usually revealed in the subsequent questions and/or behavior. See the recent rash of people leaving anti-LatinX messages on the tip line of their recipts in Mexican restaurants.As with most things in human interaction, context matters. In current America, a white person asking (or worse, pressing) such a question of a member of a minority is going to smack of racist-gatekeeping.

Similarly, on context: In the real world, I'm a big blond, blue-eyed guy. I'm told I read as pretty standard Anglo-Saxon. But, my folks where immigrants from a country nobody hears about, so I have a weird name. The reception I get on the phone, from those struggling with the name, can be markedly different from those speaking to me face-to-face.
Where are you from?

