Here's comparison between G4560 and i3-7300,
link:
http://cpu.userbenchmark.com/Compare/Intel-Pentium-G4560-vs-Intel-Core-i3-7300/3892vs3893
G4560 does cost less than i3-7300 but it also performs worse.
pcpp: https://uk.pcpartpicker.com/products/compare/XQM323,8gKhP6/
I'd go with i3-7300 but that's my personal preference.
Edit:
For gaming machine, the minimum CPU i'd suggest would be i5-6400/ i5-7400 since i5 is quad-core and fares far better in games than dual-core i3 or Pentium G series CPUs.