Sometimes, if inventory remains, they will offer the opportunity to buy up at the check-in kiosks.
On occasion, they may roll a cabin - upgrade some in coach - when they have oversold coach. It is most likely they will upgrade those with higher status (Executive Platinum and Platinum) before Gold, however.
It's probably best to buy KUP or YUP fares using aa.com (they often show as "instant upgrades" or the like there.)
But as to just getting a free (operational) upgrade, it's not very likely, I am sure it has happened, or someone who happened to be dressed up received an op up, but I am sure lighting has also struck in the same place twice. Rarely, but it has undoubtedly happened. (Why would an airline - or any business - give away what it can sell?)