Sounds like the Z is trying to go too fast and failing to step properly.
Look for:
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
Try reducing the 3rd term (4*60 in the above, say try 4*50), upload and try again.
It could be that the homing speed is too fast for your machine.
BTW: 4*60 means 4 times 60. you can put in the final value directly (eg: 240), or you can edit the equation to change your values appropriately.
Look for:
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0} // set the homing speeds (mm/min)
Try reducing the 3rd term (4*60 in the above, say try 4*50), upload and try again.
It could be that the homing speed is too fast for your machine.
BTW: 4*60 means 4 times 60. you can put in the final value directly (eg: 240), or you can edit the equation to change your values appropriately.