The Pentium G4560 *will fit* as it is designed for LGA1151 sockets. The ASRock H110M-HDS has LGA1151 sockets.
BUT
That CPU is part of the latest 7th-gen Kaby Lake CPUs. The MB was released a while back to support 6th-gen Skylake CPUs. So, this particular MB supports 6th-gen Skylake CPUs out-of-the-box with no problems whatsoever. It **may** support the 7th-gen Kaby Lake BUT only IF the MB has an updated BIOS version.
If you got the motherboard that was manufactured prior to the release of the Kaby Lake CPUs, you would need to update its BIOS (requiring you to have another compatible temporary CPU at hand just to boot up that MB). However, if chances are that you purchased the motherboard that was manufactured AFTER the release of Kaby Lake, then, *chances are* it will have come with a BIOS update already from the manufacturer out-of-the-box.
If you don't like this possibility of incompatibilities, just get a 6th-gen MB for a 6th-gen CPU *or* get a 7th-gen MB for a 7th-gen CPU