Does the undo button let you keep gold generated by gold income items?
The gold that you gain from GP10 items will be Removed upon klicking the undo button. The patch notes of the patch in which the feature was added state that:
Items will remove benefits they granted you when undone, such as gold gained from gold over time items.
Apart from that all gold you gain in the game is permanent.
Note that you also cannot undo boot enchantments.