Dogs are renowned for ‘looking back’ at humans when confronted with a problem, but it has been questioned whether this implies help-seeking or giving up. We tested 56 pet dogs from two breed groups (herding dogs and terriers) in a modified unsolvable task paradigm. One reward type (food or toy) was enclosed in a box, while the respective other reward was accessible. With both reward types, human-directed gazing in relation to the box was significantly positively correlated with interaction with the box, as long as an alternative was available. This suggests that both behaviours served to attain the unavailable reward and reflected individual motivation for the inaccessible vs the accessible reward. Furthermore, we varied whether the owner or the experimenter was responsible for handling the rewards. In the owner-responsible group, dogs rarely gazed at the experimenter. In the experimenter-responsible group, dogs preferentially directed box-related gazing (prior to or after looking at or interacting with the box) at the owner. Still, they gazed at the experimenter significantly longer than the owner-responsible group. Conversely, toy-related gazing was directed significantly more at the experimenter. Thus, dogs adjust their gazing behaviour according to the people’s responsibility and their current goal (help-seeking vs play). Gaze duration did not differ between herding dogs and terriers. We conclude that dogs use gazing at humans’ faces as a social problem-solving strategy, but not all gazing can be classified as such. Dogs’ human-directed gazing is influenced by the social relationships with the persons, situational associations, and context (unsolvable problem vs play).