There is no “right time” to start preparing for the exam. The earlier you begin, the more time you have in your hand. However, if you think time is less, do not panic. Set a goal and stick to it.
As you are in 2nd year, you have long way to go and I appreciate your vision. You will surely have the advantage by starting the preparation now.
You just need to do one thing now, check the current GATE syllabus, go through it carefully. Identify the subjects which you are covering now and in coming semesters. Learn those subjects conceptually. Digest the topics. If you do this consistently, I am sure you have all the armors for GATE exam.
Here is a list of Important Books for GATE subject wise. You can refer them for exam preparation.
Its important to understand the basics of your core subjects from the 1st semester itself. The main motto to get succeed in GATE exam is to follow standard books and learn the subject with problem solving involving mathematical interpretation. And know where that subject is applied i.e., its application.
GATE Previous Year Question Papers are very helpful in understanding the examination pattern, distribution of marks and difficulty level. Solve as many as you can during your preparations.
You can test your preparation by giving GATE Mock Test on regular basis.
You can also refer to GATE Exam Preparation Guide to get more preparation tips and important resources to refer.