Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Does the AI ever purchase units, land, or buildings?
Will an AI make use of excess gold?
The answer is YES. Based on my experience, AI's are buying units specially when they are surrounded(usually the Capital) or about to lose a war.
There are instances that an aggressive civilizations are buying units when they declare a war against other civilization.
Required, but never shown