Do low grades in standard 12 and first year of bachelors (including a few repeats) hamper the admission to a PhD course in Europe if one has a research paper published and a masters degree in relevant discipline with decent grades?
This may depend on the country as well as university/institute. You should have a look at the corresponding websites, as most information regarding PhD admission can be found online.
For example, the TU Munich website  states:
Results are considered to be above average if studies were completed with an average grade of at least 2.5, or at a minimum passed with a grade of “good.” In exceptional cases, your above-average qualifications can also be proven through academic work (e.g. publications) completed after your course of study.
This means that your bachelor or earlier grades to not affect PhD admission as a hard citerion. However, when you hand in your application the professor will have a look at ALL your grades. It is his/her finial decision whether to accept you, so all your grades might have an influence on the outcome.
Personally, I have experienced that having publications beforehand helps a lot. Thereby you prove that you have at least a basic understanding of scientific work. This may give you an advantage compared to other applicants.