The archetype for the idea likely comes from Equilibrium
While there are interesting and related examples of Gun Fu in John Wick and The Raid, the movie that probably deserves the original idea attribution is Kurt Wimmer's Equilibrium. While the movie is sometimes thought of as a low-budget Matrix rip off it is widely loved and is something of a hidden gem.
Its relevant to the origin of Gun Fu is that it actually invented and named what might be the original idea. In the movie a totalitarian society tries to suppress human emotion using drugs and a pseudo-religious police called the Grammaton Clerics. The movie itself explains that they are specially trained in the art of Gun Kata which is a martial art designed around a statistical understanding of the disposition of enemies in gunfights. This enables them to avoid being hit by enemy fire and also to have a high kill ratio when shooting back.
Many action scenes in the movie are based on the idea and Clerics defeat superior numbers of better armed enemies pretty frequently in scenes that, though slightly absurd, are extremely visually entertaining.
So, whether the idea of Gun Fu can be reliably traced back to a single idea or not, Equilibrium gave the idea a specific name and contained plenty of examples of it. And it did this in 2002, nearly a decade before some of the other quoted examples (John Wick in 2014, The Raid in 2011) were released.
It is also probably true that Wimmer was influenced by more conventional martial arts movies. His contribution seem to have been to add modern weapons into the mix.