The answer is that we don't know where the Q get their powers from. We're not vague on this, we simply have no idea.
However, all is not lost. Leaving aside the option that Q was an elaborate deception of some sort, there are only two possibilities: Their powers are physically part of them, or their powers are a form of technology. Perhaps this can't be answered, but we can look into what's likely and what isn't.
Q powers as innate abilities
Q - that is, the Q we most often saw on The Next Generation - would frequently and loudly claim that the Q were evolved well beyond humanity and other Federation races. He was hardly the most trustworthy source of information, but this does strongly imply that the Q's powers are innate, much as our own senses and abilities are. However, life forms that believe in their own superiority against all evidence are common in Star Trek.
Also supporting the theory of innate powers are the Voyager episodes where Q and Quinn take human beings to the Q Continuum. What they and the viewers see is a translation of the Continuum into something that human senses can detect and understand. That this is even necessary does add weight to the theory that the Q are highly evolved.
And, as others have pointed out here, beings with extraordinary powers are not unknown at all in Star Trek. Some of them are even main characters. (For example, Spock and Odo.)
Q abilities as tech
The Q are... what? Biological beings? Energy beings who manifest in physical bodies when convenient? It's vaguely implied that they are energy beings, since a physical form seems to be an odd experience for any Q, but nowhere is this stated.
If they're biological beings, this tech could take for form of nanotechnology or hidden devices. If they're energy beings, analogous devices would be information structures that manipulate energy and matter. In other words, software that can manipulate reality directly.
The energy/software option is attractive because it seems simpler and more elegant than a Q who has to go to a continuum-equivalent to Best Buy for the latest gadgets.
However, particularly advanced technology could also include advanced UI that allowed the Q user to simply think what they wanted and make it so. Perhaps there's a place in the continuum that tracks all Qs authorized for their powers and Makes It So for them, whenever they are.
(Can you imagine the nightmare it would be for the Q help desk? When Facebook goes down, people complain for days. Qs would tell stories for millennia about The Great Three Second Downtime Event.)
Beings with technology-derived superpowers are common in post-TOS Star Trek. (Such as Geordi and Data.)
It's also possible that the answer is a combination of both approaches.
In summary
In this context, the difference between a biological ability and advanced technology can be vague. If a species uses gadgets to fly, that's technology. If they direct their evolution with genetic engineering, so they can fly without gadgets and pass that ability to their offspring, that's a tech-enabled innate ability.
What this comes down to is that, in Star Trek canon, we have no way of knowing which of these is the truth, but I can make a reasoned guess:
Gene Roddenberry, who invented the Q, was a believer in the bright future of humanity. Perhaps the Q was what he saw us evolving into, one distant day. He also believed that technology would make our lives better.
If I had to bet on this, I'd bet that he meant for the Q to be an evolution into a better kind of intelligent being, helped along by technology. I assume tech could have been a part of this, given that tech-derived powers were where his head was at while creating TNG.