Basically, as mortals become less reliant on the magic made from the gods, the less they have to associate with it. The gods, in turn, begin to take away the magic, forcing humanity to either give up their ways and resume their worship of the gods, or continue away from the gods and try to become self-sufficient. Of course, it's not that simple either. If say, a god throws a hissy fit and decides to say "Screw you, mortals!" and leaves, this forces mortals to either adapt or die. If they are suffering too much, they may try to get their gods favor back. Or they survive, and make due. That would likely be why the Ancient Magics are rarer; the gods that ones were their patrons, for some reason, loosen their influence on the mortal world. And the mortals decide that they don't really need it and don't bother to try to bring the gods back, making due with either different magics or their own means.
So Free, let make try to make an example of how it could turn out. You know that only those with Lux mageblood can use Pyromancy or Vitamancy. But if mortal technology advances were anyone could use something akin to Pyromancy or Vitamancy, it would likely gain more use than mages who have the blood for it, due to it now becoming more common. The god of Lux or it's derivative would than have to decide whether or not it should bother keeping attention to the mortal world, seeing that their influence is waning. They likely wouldn't, and so Pyromancy and Vitamancy as a blood magic dies out. In the best of both worlds, one could fuse magic and technology together, but that merely means that you have to take into consideration both their flaws. Magic, while commonplace, is not given freely throughout the world. No one can simply go to the college and learn magic unless they have the blood for it, which mostly randomly determined (Not even being a child of mages ensures mage blood, just makes it more likely). There are more normal mortals than there are mages, you only see many mages because we're at a location were there is suppose to be many mages.
Technology, while complicated and hard to develop quickly, can be used by anyone and become common place. Magic, while powerful at it's beginning, can only be used by a selected few, and fewer who could ensure the maintenance of things created by magic. When Technology becomes more efficient than magic, wouldn't it make sense to chose the better alternative? It's not to say that technology is superior, simply that when your population of magic users is dwarfed by the population of non-magic users, the majority would like an equalizer. In a perfect world there would be a balance between magic and science, but that is not the case.