Heartgold's gen 3 , like how ORAS ( remakes of gen 3 ) is a gen 6 game. That's why it can in HG, because in remakes , the gen of the game increases making it able to do stuff it couldn't before. In remakes they also place upgrades , gyarados learning e-quake is one of them.