My experience of dogs is that they can be very attuned to emotion. I had a dog, and she would regularly come and put her head on me and lick me when I was troubled or concerned. Dogs are also pack animals and can detect aggression and anger as well, reacting with defensiveness or docility, depending on context.
This may have to do with the pheromones we give off, small behavioural changes, facial clues, muscle tension - any number of gives, some of which are likely to be undetectable to us.
We have a very human tendency to anthropomorphise animals. There's no reason to suppose they can't detect things which humans aren't naturally able to.
Edited by vimesey, : No reason given.
Could there be any greater conceit, than for someone to believe that the universe has to be simple enough for them to be able to understand it ?