Might also get something eaten by your shell since in seems that the G’MIC doesn’t get {6*($>+1)} but the G’MIC interpreter only gets something like k={6*($ which is indeed unbalanced, you might want to try something like
echo gmic [rest of command]
to see where it goes wrong
On bash I needed to escape some stuff to get it to work (note the backslashes near --rotate and -apply_channels) although I suspect you are not using bash (goes wrong somewhere else)
gmic -input ampersand_goudybl1911.svg -negative[-1] \
-blur[-1] 3,1,0 100% 100% -append c -expand_x {{w}/2} 100%,100%,100%,100% \
-append[-2,-1] y 100%,100%,100%,100% -repeat {360/6} k={6*($>+1)} \
--rotate[0] {\$k},2,1,255,255 -apply_channels[-1] \"-add \"\$k,hsl_h \
-blend[-2,-1] negation,0.7 -done -rm[-2] -output twirl.png
EDIT: for code readability