The key is in the nature of the sound and its duration.
Jarring, as you've found out, is incongruous in a striking or shocking way. Incongruous means, essentially, not like its surroundings. And when something gets jarred it is hit or struck (thus striking in the definition) such that it is perturbed. So a sound that is jarring will hit you suddenly and jar you: make you lose your train of thought, wake you out of a day dream, or otherwise perturb the state you were in prior to hearing the sound.
A grating sound affects you more like a grater affects a block of cheese. Each little bit of sound would not too bad by itself, but being subjected to it over longer periods of time causes you to become more and more annoyed.
Thus the sound of the waiter dropping the pitcher of water during the musical performance is a jarring sound because it abruptly, and harshly, interrupts your enjoyment of the performance; while the sound of the performer's voice being slightly off-key and a little bit gravelly is a grating sound because the longer you listen to it, the more annoyed you get, until you decide to leave because you can't take it anymore.
Obviously I hope the performer you were enjoying in situation 1 is different than the one in situation 2. ;-)
I would say that a jarring sound might startle you, while a grating sound would irritate you.
Also, jarring sounds tend to be uncomfortably loud (like the jarring noise of a fire alarm); while grating sounds can be very soft (like a mouse scratching behind a wall, or the constant drip of a leaky faucet). Some jarring sounds may also be grating, but a grating sound would only be jarring if it was sudden and/or loud.
Maybe this will help: It's easy to be jarred awake, but a sound sleeper wouldn't be grated awake.