Basic principle suggests a current controls the galvanometer, like a D'Arsonval meter movement. You would need to make an interface to convert a g-code to current.
Lighting systems often use a DMX protocol A small stepper might work where the "steps" are controlled by say an 8-bit code.
Here a guy uses a loudspeaker as a galvonometer. Arduino Laser Show with Full XY Control