Pablo Fornals' first international goal from a tight angle and Ferran Torres' late strike proved the difference as Milot Rashica and Vedat Muriqi were made to rue missed chances for the hosts.
The visitor's loss against Sweden was its first in FIFA World Cup qualifying since 1993 and ended a 66-match unbeaten run but wins against Georgia and Kosovo have got them back on track.
Luis Enrique's men sit four points clear of Janne Andersson's side, which was beaten 2-1 by Greece on Thursday, although it has two games in hand.
After Koke's deflected shot brought the first save from Arijanet Muric, Elbasan Rashani fired narrowly wide with a curling left-footed effort as the hosts dominated the opening stages.
Fornals punished Kosovo for not making their dominance pay, the West Ham man blasting a left-footed strike past Muric after a smart turn following Alvaro Morata's offload.
Morata almost doubled the lead with a long-range attempt before Carlos Soler's speculative free-kick forced the Kosovo goalkeeper to parry away.
Rashica offered Spain first-half warnings running in behind but they did not learn their lesson, Muriqi racing through one-on-one with Unai Simon after the break before dragging into the side-netting.
Torres then attempted a cute free-kick, arrowing under the wall but the wrong side of the left-hand post before Simon produced a low reflex save against Zymer Bytyqi as Spain clung onto their lead.
Torres added a late finish of his own, racing through and finding the bottom-left corner, with the goal standing after VAR reversed an initial offside decision.