She might have had Harry's key
We know from Chapter Five of Philosopher's Stone that the way Harry's vault is accessed is by presenting a key to the goblins:
“Morning,” said Hagrid to a free goblin. “We’ve come ter take some
money outta Mr. Harry Potter’s safe.”
“You have his key, sir?”
“Got it here somewhere,” said Hagrid, and he started emptying his
pockets onto the counter, scattering a handful of moldy dog biscuits
over the goblins book of numbers. The goblin wrinkled his nose. Harry
watched the goblin on their right weighing a pile of rubies as big as
“Got it,” said Hagrid at last, holding up a tiny golden key.
I don't believe that Harry's key is ever mentioned again in the series. It's unclear who had it after they left Gringott's in Philosopher's Stone. It is entirely possible that Hagrid took it back and held on to it, or gave it to Dumbledeore (presumably where he got it from in the first place) for safekeeping. Whoever had it during the beginning of Goblet of Fire could easily have given it to Mrs. Weasley to enable her to do Harry's shopping for him.
However, in Chapter Four of Prisoner of Azkaban Harry was able to retrieve money from Gringotts on his own:
Once Harry had refilled his money bag with gold Galleons, silver
Sickles, and bronze Knuts from his vault at Gringotts, he had to
exercise a lot of self-control not to spend the whole lot at once.
This would indicate that even if Harry had not always held on to his own key throughout the years, he at least had it then. But even if Harry was in possession of his own key, he could have simply given it Mrs. Weasley himself for the one-time shopping trip.
She might have had connections
In Chapter Six of Half-Blood Prince we find the following:
"That's already Harry's, idiot," said Bill. "I got it out of your vault for you, Harry, because it's taking about five hours for the public to get to their gold at the moment, the goblins have tightened security so much.
Apparently, Bill was able to access Harry's fault without any prior authorization. This is likely because Bill is either important enough himself, or knows someone else at Gringotts, to bypass the regular procedures. It is conceivable, then, that Bill might have arranged something in Goblet of Fire as well, and that is how Mrs. Weasley was able to access Harry's vault.