Spain had been patient in their playout from the back, but it came to be their undoing on 52 minutes.
Sergi Roberto tried to be too clever and saw his chipped pass interceted, with the ball falling to Kramaric just outsdie the box.
The striker drove in to the box and then finished past David De Gea, who could do nothing to atone for his defenders' mistake.
Spain had to respond quickly and did just that, with Aspas finiding Isco free on the left side of the box.
The Andalusian then picked out Dani Ceballos in the area, who shrugged off his marker and slotted the ball in to the corner.