Horsham had Danny Barker and Niall McManus forced off with what looked to be potentially serious injuries in the closing stages of their defeat at Crabble.
Charlie Hester-Cook gave the Hornets the lead after six minutes, but Euan Williams levelled for the hosts. Ruben Soares-Junior headed the winner in the 72nd minute.
Lee Harding was also dismissed for a second yellow card. It was Horsham's first away league defeat of the season, after eight matches unbeaten on the road.