Yes, disbanding units has to do with net gold. Maybe ending the turn at 0 gold for a certain number of turns in a row? Or 0 gold with very high negative gpt?
I can be at 0 gold and negative gpt and not have units disbanded. The warning comes up every turn. This can go several many turns in row, but without me having units disbanded. Naturally, I am trying to remedy the situation, and ending turns in the black when I can (but maybe less than my negative gpt). But I have yet to figure out just how bad my economy has to get before units start disappearing!
And of course, the game disbands units with the most XP first! So when I get into this sort of crisis mode, I will start disbanding units on my own. I might be at triple digit negative gpt but disband one worker at the end of my turn. So I end the turn with 17 gold, and the game will not disband a veteran unit on the front line. Of course, it is not like I have an unlimited supply of idle workers, but this tactic can stretch things out quite a while...
But I would like to start that vicious cycle on my own -- before the game does it for me!