In just three alterations from the Catalans, Clement Lenglet, Serginho Dest and Pedri dropped out and Ilaix Moriba, Samuel Umtiti and Sergi Roberto entered from the win over Villarreal.
Barcelona made the breakthrough before the 23rd minute spell after a layoff from Antoine Griezmann freed captain Lionel Messi to slot in off the far post of the net.
The Blaugrana outfit could've grabbed a second 12 minutes later from a corner-kick into the centre of the six-yard area, but defender Umtiti headed straight at goalkeeper Aaron Escandell.
Nasrids began to show resolve and closed in to the equaliser a little before the break through a smart move from point-blank range by Roberto Soldado, but he only found the side-netting.
Griezmann, who provided the opener, looked to hand Barcelona a second from a shot on the turn minutes after halftime but he dragged his attempt well wide of target.
More chances cropped up for the host soon thereafter as a half-volley from a floating ball out on the left-side saw Roberto fire over from close-range in the offensive area.
Barcelona were unable to hold onto the lead as on 63 minutes Darwin Machis broke free on the far side to go clear and beat goalkeeper Marc-Andre Ter Stegen with a closed-range finish.
This inside the last 20 minutes prompted two substitutions from Barca, with Ousmane Dembele in for Oscar Minguez and Moriba removed in favour of Pedri.
Nasrids however seized total control with 12 minutes to go after an unmarked Jorge Molina creep in behind Gerard Pique to nod home a left-sided cross.
Barcelona urgently begin their search for the equaliser before fulltime, but the Nasrids held their nerve to claim victory and deny the host top spot.