How to find a gap in knowledge, for my PhD?
Ask the advisor.
If he/she is helpful, follow their advice.
If he/she is not helpful, either 


change the advisor (which is preferred) or else
find an interesting and open problem in your field (in some areas such as mathematics, searching for "open problem" or similar in recent publications, including literature reviews, might help). The problem should be such that that you should be able to solve it within the time allocated for your PhD studies, including writing your dissertation. Then, ask the advisor again whether the problem is suitable for your thesis. How to proceed from there would be a different question.