I messed up in my university even in courses related to my field of interest. The main problem was lack of discipline: I would alternate between high-intensity periods where I only stopped to sleep and low-intensity periods where I would work on random subjects unrelated to my coursework, or not work at all. My combined GPA for B.Sc. + M.Sc. is only 6.3 out of 10 (which is something like a 2.1 GPA in the US) -- slightly lower for undergrad and slightly higher for the master's.
I can't go back to change my grades, but is there anything I can do to significantly improve my chances of getting into a PhD in Europe? I did attend one of the top institutes in India, after clearing the national level entrance exam. Also, I co-authored a publication with a professor from my institute. My MA thesis received a good evaluation and I have a very positive letter of recommendation to show.