Firstly go through the complete syllabus of GATE exam.Then study the topics from standard books , you can also watch nptel lectures to understand some topics that you are unable to understand from the book. Now, the most thing, that is Practice. To get a good rank you need to practice a lot of questions to improve accuracy and speed.And solve past year questions..