I'm ashamed to say I got a D at GCSE physics and C at GCSE Maths, but somehow I still managed to get my licence (albeit an FAA one which I am now in the process of converting) and a job (Which I recently lost due to my employer getting rid of it's charter fleet!).
I was never motivated at school, but worked hard when it came to my flying. I'm now having to study once again, this time to convert my licence to a JAA one which means doing all 14 ground exams. But, despite my poor grades at school, I'm devoted to my end goal and have taken a job as cabin crew in the meantime while I finish studying.
Work hard at school, but focus on subjects that interest you, not what you feel airlines and FTOs want to see. If you stay interested, you are much more likely to succeed. Good luck!
Edited to say my grades weren't all bad! Got a lot of A's and B's!!! Just not in subjects that would directly help me in my future career!