To have it in you means that you have abilities and skills which you do not usually use and which only show themselves in a difficult situation.
There are a number of ways you could use this phrase but one example would be, if speaking to a friend.......'You were brilliant yesterday, I didn't know you had it in you!!
I hope this helps.