Inflation leads to loss of gold reserves
Inflation won't necessarily change the price of goods from country B in real terms, but it will change the relative costs of buying goods from country B now vs saving now and buying goods from country B later.

Under the gold standard, there are no central banks to force the interest rate up when inflation rises. If inflation goes up but interest rates don't go up, then consumers in country A will save less and spend more, leading to a temporary increase in imports from country B.