holy shit the answers here are so dumb it makes me cry.
putting 3 points into grapple doesn't at all decrease your dps potential.
furthermore you can grapple not only against knockdowned opponents, but you can grapple against stunned/dazed opponents.
and STILL you can grapple against blocking opponents.
so saying "getting grappled you do something wrong" is only said by retards.
OP asked the TIMING to counter against grapple
so here is the answer, although im fairly new to the game too but i have a platinum level45 kfm:
you cant counter autoattacks, but you can counter pummel (button 2) better kfms usually just use headbutt (button 1) which is i heard very hard to counter, a fast 1 hit which heals 8% health altogether. (pummel heals 9% but deals more dmg) +3 autoattack is another 9% max hp heal.
usually kfms who grapple are bad. (like me, although i still reached plat but i can vouch that im bad, but luckily others are even worse. i dont even know any other classes skills, i dont even use 3rf i just spam shin kicks. hell i dont even understand what my X does, yet still i have good reflexes and good predictions/psychology to do good with lots of counters and counterbreaks)
so against grappling kfms you will probably win if you spam F to roll back and counter breaks (unless he uses twin fangs) you have more escapes and same cc combos so you should be alright if you practice the matchup. i heard from other kfm pros that hardest matchup for kfm at high elo (korea diamond) is blade master.
usually the way i lose with grappling heal spec is timer running out, and enemy doing more dmg to me. so you can try to play defensively while your combos are on cooldown so if timer runs out you will probably win.