There's an old song, popular in 19th century America, Possum up a gum tree - its origins are obscure, and a good many variant versions can be found online and on YouTube - some include language that would certainly require a trigger warning these days, which is probably one reason why it's rarely heard now. I think it probably is the origin of the phrase 'up a gum tree', that is sometime still used like 'up shit creek without a paddle'.
This blog gives an account of various stories about the song, but they may be apocryphal, and imply that it was well-known in the pre-Civil War States of America.
https://library2.utm.utoronto.ca/otra/minstrels/node/519409
So, it seems to be a southern US song. Possum is opposum, ok, but what is the gum tree? Presumably not what I would understand as a gum.
There is an imported tree here in Sydney called liquid amber, I believe it's called sweet gum in the USA? Something like that?
btw if you find yourself under an Australian gum tree, watch out for drop bears (the koala's more deadly cousin)