There is a likely non-fictional source in the woodcuts Hans Holbein depicting the Dance of Death.
Stories of the Dance of Death (a motif used in many works of art as a reminder that all men die, regardless of their station) became increasingly popular in Europe during the 14th century, likely because of the horrors of the Black Death and the Hundred Years' War.
In 1526, Hans Holbein the Younger created a series of drawings depicting the Dance of Death, 41 of which were rendered in woodcuts and published in 1538. Regarding the book of woodcuts:
The popularity of the work and the currency of its message are underscored by the fact that there were eleven editions before 1562 and over the sixteenth century perhaps as many as a hundred unauthorized editions and imitations. Ten further designs were added in later editions.
Many of the dead depicted by Holbein are decomposed to the point of appearing skeletal. There are even images of skeletal undead armed with weapons and fighting:
Source page no longer available
These woodcuts may not be the source of the idea of the animated skeleton in Western culture, but they definitely popularized it. There are lost painting and images of the Dance of Death which might have presaged Holebein's ideas.
Stories of undead in general are at least hundreds of years older, as tales of revenants, jiangshi, and draugr are quite old and clearly about (non-skeletal) undead. Any tale of re-animated corpses could be a source or precursor to skeleton stories, depending on the state of the corpse when it is animated, so finding a definitive true source may be impossible.
Regarding Ezekiel, chapter 37, the re-animated corpses start off as skeletal, but are not even fully animated before flesh is added to the bones, so this may be the oldest extant story about what today we would call "undead", but it doesn't seem to be about animated skeletons.
From Verses 7-8 (emphasis mine):
7 ...there was a noise, a rattling sound, and the bones came together, bone to bone.
8 I looked, and tendons and flesh appeared on them and skin covered them, but there was no breath in them.