Probably the Midi-chlorian equivalent or something. Although in Star Wars, Midi-chlorians are inside every living thing and simply having enough of them can grant you the ability to use the Force (I believe). I'm not sure. Guessing it has to do with simply being born of wizard blood, there's gotta be something biologically going on that can't just be given to a person unless it's from birth.
Wizards are randomly born to Humans (doesn't matter if the parents are Muggle or Wizard). Wizards have never been able to figure out a predictable pattern to it, so they just pick the kids up and bring them into the Wizarding World after-the-fact.
The child of a Wizard can also inherit some measure of a Wizard parent's magic (in addition to the random appearance of magic). This led to Wizard inbreeding as they try to preserve and maximize their magic power, but the idea that a "pureblood" Wizard is superior to a "mudblood" or "half-blood" Wizard is total bullshit, because you never know how much magic a kid is going to inherit (even if you draw from two sources), and some purebloods inherit exactly zero magic (looked down on by purebloods as "Squibs"), so purebloods are not automatically more powerful than a fresh spontaneously-created Wizard (that's just a lie they tell themselves to make themselves feel superior).
Neville was a late bloomer, and he would have been killed as an infant if his power hadn't briefly manifested when he was thrown out of a window.
Inherited magic power can apparently come back stronger in one generation than it was in a previous generation (see the "Heir of Slytherin" effect in Voldemort).
And magic power CAN be artificially granted to a Muggle.
Magic power comes from the soul. If your soul survives, you and your magic can survive the complete and total destruction of your physical body.
Voldemort ripped his soul through the crime of murder, and placed pieces of it inside inanimate objects, granting himself immortality (or at least extending his life to the life of the inanimate object), and in the process, he granted his own soul-based magic power to those inanimate objects. The diary, for instance, was able to grow and produce another Voldemort, complete with his Parseltongue ability.
Harry Potter inherited James Potter's exceptional ability to ride a broom, but he also inherited all of Voldemort's magic powers, due to being used as a Living Horcrux, and the presence of a fragment of Voldemort's soul being inside Harry. It's not clear whether Harry retained Voldemort's magic powers after Voldemort's soul was extinguished. Harry's soul might have "learned those abilities", so to speak. Or maybe he didn't get to keep those Slytherin abilities and he's back to just being the child of James and Lily Potter.
Therefore, it stands to reason that if a Muggle had been used as a Living Horcrux, they would gain magic abilities, for at least as long as they possess the Wizard's soul fragment.
Also note, Voldemort's personal magic power apparently didn't decrease as he made Horcruxes, and he was engaged in a failed/aborted experiment to apply Arithmancy to his Horcruxes, which would have theoretically done something to his soul and unlocked exponential new magic powers, beyond mere immortality.
Also, Muggles and Squibs are capable of using items that have been enchanted to act on their own by a Wizard. But they obviously cannot use magical items that require magic for their activation.