Scientists tell us that bears and dogs share a common ancestor. About 38 million years ago, the bear and dog lines separated into two distinct groups. The bear group began to walk on the soles of their feet while the dog group (called “canids” which includes modern day dogs, wolves and foxes) continued to walk on their toes. As bears evolved into omnivores, which means they began to include plant material in their diet, their gut became longer. Since plants take longer to digest than meat, plant eating animals need longer guts than carnivores. The bears teeth also changed over time. Canids tear their food when they eat, and have typical carnivorous teeth - small pointed front teeth and pointed molars. But bears crush and grind their food and therefore have short front teeth and rounded molars.
They are also both in the order of mammals known as carnivora, and in the same suborder, caniformia, along with weasels, racoons, and seals. So they are fairly closely related, which suggests a fairly recent common ancestor.
Source(s):
US Fish and Wildlife Services