The Athlon is a good bit better all around. It is more modern and uses AM4 and DDR4. It has 4 cores and 4 threads clocked at 3.5ghz with a 3.8 turbo.
I think the Athlon may be FX-based, which is a big downfall.
The Pentium G3220 has only 2 cores and threads and 3ghz clock. It is Haswell based, so it may have a 1 thread advantage, but I cant suggest a 2t cpu for really any use.