Using 'gawk' implies rudeness or poor manners, as staring at someone can be invasive. He didn't realize he was gawking at a stranger, which made them uncomfortable.
Pro Tip 2/3
Astonishment Context
'Gawk' is often used when someone is so surprised or shocked that they stare without realizing. She gawked in astonishment at the magician's performance.
Pro Tip 3/3
Cultural Sensitivity
In many cultures, gawking is considered disrespectful and should be avoided. Visitors gawked at the local ceremonies, not knowing it was impolite.