The electromagnetic force (of the fundamental forces) does predominate, arising from Coulomb repulsion of the electrons and nucleus and the Pauli exclusion principle. If I wanted to estimate the energy $U$ released, I'd look to the strain energy. This is $$U=\int \sigma V\,d\varepsilon=\int K(\varepsilon)V\varepsilon\,d\varepsilon,$$ where $\sigma$ is the pressure required to obtain the equivalent compression, V is the volume, and $K(\varepsilon)$ is the bulk modulus (i.e., the volumetric stiffness) as a function of the compressive volumetric strain $\varepsilon$. Here, we're simply integrating the infinitesimal compression work done while keeping open the possibility that the bulk modulus varies with the strain, as the latter is very large.
(If the strain were small enough that the bulk modulus and volume could be considered constant, which is the typical treatment in linear elasticity, then we could move $K$ and $V$ out of the integral and obtain simply $KV\varepsilon^2/2$.)
Since bulk compression is generally recoverable, we could make the assumption that immediately after the transformation, the system releases this strain energy immediately in a variety of phenomena that all ultimately dissipate into thermal energy.
The bulk modulus of gold is about 150 GPa. Assuming that a 1 kg duck is mostly water (volume 0.001 m³), we have 60 moles of water or 180 moles (36 kg) of gold, as it's specified that each atom is changed to gold. This mass of gold (with density 19,000 kg/m³) would normally occupy 0.002 m³, so the volumetric strain is 0.5. Considering the bulk modulus to be strain-independent as a first pass, and approximating $V$ as the average of the initial and final volumes, we calculate $U=(150\,\mathrm{GPa})(0.0015\,\mathrm{m}^3)(0.5)^2/2=28\,\mathrm{MJ}$ of energy. Since a ton of TNT is reported to release 4 GJ, this energy corresponds to about 0.007 tons of TNT.
This is much less than the reported value of 0.5 tons of TNT, but note that we can expect the bulk modulus to increase sharply with increasing compression; this is a consequence of the pair potential having a much-higher-then-quadratic dependence on the interatomic spacing as we compress a material mightily. (Otherwise, the pressure needed to compress a material into nothingness would be exactly $K$.) That increase in the bulk modulus results in much more releasable strain energy stored in the material.
Please let me know if you see a calculation error. I'll look for the compression dependence of the bulk modulus of gold or similar metals.
Edit: Found a very useful figure from E. Güler and M. Güler, "Geometry optimization calculations for the elasticity of gold at high pressure," Advances in Materials Science and Engineering (2013):
Note that assuming a constant bulk modulus of 150 GPa would imply that 75 GPa is required to obtain a volumetric strain of -0.5. The initial slope is heading in that direction, but the actual value exceeds 1 TPa for the reasons discussed above. This corresponds to more stored energy and a much better fit with the quoted value. This makes me very curious as to what calculations they performed to obtain their estimate.