It Might Not be a Problem
Inflation isn’t bad for everyone. It’s particularly good for farmers, and most of her subjects are probably farmers. In modern times, several populists (such as William Jennings Bryan) have run on an explicit platform of raising inflation in order to help farmers and the poor.
It’s bad for moneylenders, whom she might care about, might not care about, or might even consider enemies. It’s also bad for anyone who collects a fixed income. In the modern world, most people like that are pensioners, so we think of inflation as bad for seniors. Historically, though, that usually meant a lord who’s due an annual rent for his lands, and the amount might have been fixed by the ancestors of the lord and his tenant in perpetuity. The Queen herself might collect most of her income that way, but it’s also possible that she could use inflation to lower the real incomes of the rest of the feudal nobility, and hence their power. If tenant farmers have to pay a fixed rent in gold, rather than in produce, inflation would be tantamount to a tax cut for them.
There is a potential vicious cycle where the Queen has some expenditures she needs to keep paying (like her army), and if she tries to meet those by magically creating more gold, she’ll start a vicious cycle where weapons cost more gold and soldiers demand higher pay, so the more gold she has, the more she needs.
This is probably not a bigger problem for her than her rivals, but she can avoid it if she has an effective enough tax system that she doesn’t need to create gold to balance her annual budget. Prices would still rise, but she would not get hyperinflation. The more money is in circulation, the more taxes she collects, so she’s fine.
This implies she should be creating gold to invest in one-time capital expenditures, not ongoing or recurring expenses. (But you could tell an interesting story where she doesn’t make optimal choices according to anachronistically modern economic theories.)
Switch to a Silver Standard
I’m not the first person to suggest this, but the details of how she tries to do this matter. The basic idea here is to send her ships out to buy silver with her magical supply of gold. (Also copper, since pure silver is too soft to make good coins, and silver coins are alloyed with copper.) The strategy here would be to get as much of the world economy to switch to the silver standard as possible, with her hoarding most of the gold and most of the silver. At that point, she doesn’t need to worry how much the mage’s discovery devalues gold. That will only hurt regions of the world that stuck with gold, maybe because she bought all their silver up.
When other rulers inevitably figure out the infinite-gold cheat, it won’t damage the value of her country’s massive hoard of silver at all, and it will be too late for them to amass one of their own.
The major decisions here are about whom she’s going to subsidize and who’s on their own. For instance, if she officially declares that one gold coin is worth sixteen silver coins, and the royal mint will trade one for the other at that ratio, then when there’s a gold glut and a silver shortage, you would expect people to all want to trade their gold coins for silver that’s worth more than the gold now. This is going to cost the Queen real money—she has to sell her silver, which she can’t magically create, for less than its value in gold that she doesn’t even need. However, that does take gold out of circulation, get people to adopt silver coinage instead, and spread the wealth she’s creating out among the common people.
She might or might not try to pass laws to get her people to keep silver at home and spend their gold abroad, but this would be hard to enforce.
If she wants to rescue whatever early-modern financial system she has, another thing she might do is buy up, with silver, their loans payable in gold. Collecting the loans would then be another way to remove gold from circulation, and lenders in her realm would then have silver rather than gold to lend.
Make Long-Term Investments
If she invests her gold on something durable, like a new road, a new colony, a mill, a shipyard, a canal, a levee, dredging a river, or an irrigation system, she will have turned a temporary economic advantage into a permanent one. At minimum, she wants to convert it into durable goods she can stockpile, and that won’t lose their value like gold will.
One thing she should especially do is build granaries and food to fill them. Not only will this prevent famine if there’s a bad harvest, it will mean she’s able to bring in foreign workers temporarily to complete other labor-intensive construction projects and have enough food for them. It will also protect people living in her cities from increases in the price of food, and prevent de-urbanization.
This is a world where mages exist and are extremely powerful, so recruiting them with gold or things that gold can buy sounds like it is of paramount importance. A school for them, and especially something like a magical research university, could also pay off greatly in the long term, if it encourages mages to move there and stick around.
Depending on her situation, a big army to fight wars of expansion might or might not be another investment with long-term dividends. It’s probably a better time, though, to improve her lands and try to permanently increase the national income.
Sterilize the Gold
She might mitigate inflation at home by “sterilizing” the increase in the domestic money supply. Central banks in the real world typically do this by selling bonds (which take gold out of circulation now, and will be repaid years from now in gold that’s worthless), which should work for her. Modern Monetary Theory recommends that she instead raise taxes in gold, just to keep it out of circulation. In this setting, she’d probably dump it in a money bin somewhere, or just throw it down a deep hole.
The more open her country’s economy is to trade, the less well this will work, since imported goods will cost more gold.
Export her Inflation
The farther away she spends her gold, the longer it will take to circulate back to her country and raise prices there. A good thing to spend her fortune on initially, then, is a larger fleet of ships to buy as much as she can in as many different places before the gold really starts to make its way around.
Short Gold, Long Silver
Historically, an early-modern ruler would not have had a financial market that let them do this the same way a trader could today. However, this literally means, sign a contract to buy something (such as another currency) in exchange for a certain amount of gold, at a certain time in the future. She can sign contracts like this, to buy grain, or silver, or something else in exchange for gold that won’t be worth as much in the future. These are good deals for her.
She also wants to borrow in gold, since paying it back will be easy. She also wants to be paid in silver, which will be more valuable than the other party expected. Historically, in this time period, many loans were repaid in a different currency than were lent out. In our world, this was a loophole to prohibitions on usury, which disguised interest as an exchange rate, but if a similar practice exists in some part of the world, she can exploit it to borrow silver and pay back gold.
Consolidate her Power
You say she has enemies she’s looking to hurt if possible. If she (and her spies) take a good long look at their economic power base, they might be able to figure out a way to knock it out.
If they’re foreign, she could invest in creating competition and substitutes for it, or engineer a shortage of whatever inputs it needs by buying them up yourself, or try to make sure that they get their hands on the new gold last, so they have to pay higher prices without ever getting the benefit of its purchasing power. Maybe even poach some of their most-important specialists.
If they’re domestic, she wants to try to make sure that the major changes she’s making to the economy hit them hardest. Maybe she can get the nobles on the hook to supply her with goods, troops, or silver, while their own income is in gold. When they can no longer afford to keep that up, she can then extract concessions in exchange for renegotiating the arrangement.