The boy suffered a “serious accident” during a private practice session on Saturday at the track in Llanera in Alonso's home region of Asturias, it said in a statement.
He was not able to overcome his injuries and died in the early hours of Sunday, the statement added, without providing further details about the accident.
Spanish media said the boy's kart crashed with another kart and flipped over, trapping him underneath.
The federation said an investigation into the accident was under way. Alonso said in a Twitter message that he was “devastated” by the news of the boy's death.
“I woke up early this morning to one of the saddest days,” he added.
The boy's hometown of Villarcayo declared an official day of mourning.