No, horses were not domesticated before dogs. So when were they domesticated? I think that it is fair to say that you will still find disagreement among the experts. But even taking a conservative approach, the domestic dog came into existence around twice as long ago as the domestic horse. In 1989 Dr Desmond Morris in his book Horsewatching said that the horse “was something of a late-comer on the domestic scene”. He writes that “dogs, goats, sheep and cattle had all been brought under human control for thousands of years when in the third millennium BC the horse was first domesticated”. You can add cats to the list.

In 2012 the BBC, on their website, confidently stated that the mystery of the domestication of the horse can be dated to 6,000 years ago on the grasslands of Ukraine, south-west Russia and west Kazakhstan. DNA analysis provided this information, which was unavailable to Dr Desmond Morris in 1989. You will see variations on the date of domestication of the horse nowadays or at least that appears to be the case.
As for the dog, some experts believe that the grey wolf was first domesticated around 40,000 years ago, which is probably at the extreme end of available estimates. One study suggested that dogs have been domesticated on more than one occasion. Perhaps the date of domestication for dogs and horses varied across the planet. In other words the horse might have been domesticated in different places at different times. On the Smithsonian Magazine website the authors suggest that using mitochondrial DNA analysis dogs were domesticated in Asia at least 14,000 years ago. Although older dog fossils have been found in Europe. In 2017, Nature Communications a scientific journal suggested that dogs were first domesticated at least 20,000 years ago but more likely around 40,000 years ago.
As you can see there’s still some work to do on the subject but what is clear is the answer to the question in the title which is that horses were not domesticated before dogs. The opposite is very much the case. The reason? Dogs were more useful sooner than horses. It was all about utility and usefulness in those days rather than companionship and entertainment.
P.S. Cats were domesticated around 9,500 years ago and therefore before the horse.