Frank Gore and Colin Kaepernick each ran for a touchdown to lead the 49ers to a 27-13 victory over the Miami Dolphins.