My resource count takes some time to update for building upgrades. I had plenty of "wood" for an upgrade but clicking any building to upgrade will tell me I don't have enough wood. Clicking a different building type and then clicking back on the building I want to upgrade seems to fix the issue sometimes.