Chocolate contains a chemical called Theobromine. Large amounts
of this can cause Theobromine poisoning, the symptoms of which
start with sweating, trembling and headaches, and can end with
heart failure.
Humans metabolise Theobromine quickly - fast enough that only
long term accumulation, or a large amount eaten quickly, will have
an effect on us. Other animals, including dogs, metabolise it much
more slowly. Domestic pets are most the most likely non-human
animals to have the opportunity to consume chocolate, and dogs are
the most likely out of those due to their tendencies to scavenge
anything that's within reach. So it can indeed cause a fatal
poisoning, when a dog consumes a human-sized portion of
chocolate.