Branch, who is tackling his second Dakar riding as a privateer KTM entrant, moved to the fore a little over halfway through the 367km stage, as early leader Joan Barreda (Honda) dropped almost four minutes ahead of the 214km mark.
The Bostwana-born rider managed to hang on through the latter part of the stage to win by 1m24s ahead of Sunderland, while Pablo Quintanilla completed the top three for Husqvarna, 2m21s in arrears of Branch.
It means FIM Cross Country Rallies champion Sunderland, who was fifth-fastest on Sunday's opening test, takes a 1m18s lead in the overall classification over Quintanilla.
Honda's Kevin Benavides was fourth-fastest and moves up to third overall, only 1m32s adrift of Sunderland, ahead of Matthias Walkner (KTM) and Ricky Brabec (Honda).
The top two riders from the opening stage, defending champion Toby Price (KTM) and Brabec, endured a difficult first part of the stage, Price dropping seven minutes in the first 52km alone.
In the end, the Australian gave away 12 minutes to Branch and was 15th on the stage, slipping to ninth overall behind Branch in sixth, Luciano Benavides (KTM) and Barreda.
Honda's Jose Ignacio Cornejo completes the provisional top 10.
Xavier de Soultrait took over as the top Yamaha rider in the standings, sitting 12th overall behind the second Husqvarna of Andrew Short.
Laia Sanz, representing KTM's sister brand Gas Gas this year, suffered a crash towards the start of the stage and lost some 20 minutes before she was able to continue.
Bolivian rider Daniel Nosiglia (Honda) meanwhile is out of the rally after a fall 141km into the stage left him with a head injury. He has been taken to hospital by the medical team.
Casale wins again in quads
Ignacio Casale stretched his advantage at the head of the quads category with a second stage win ahead of Rafal Sonik.
Casale had been as much as eight minutes clear of Sonik, but the pair ended up split by 3m33s at the finish, giving the former a lead of 9m09s in the overall rankings.
Simon Vitse was third-fastest, 6m51s adrift, but Giovanni Enrico occupies that position overall, albeit already some 23 minutes behind Casale.
Standings after Stage 2 (Bikes, top 10):
Jose Ignacio Cornejo