I have a very low undergraduate GPA. I used to play a sport at the state level and thought I could cope up but didn't. Failed in multiple papers, completed a 3-year degree in 5 years. In the end, I had a 2.0 GPA (On the 4.0 scale). However, I got admission at one of the top universities in my country for my master's because the bachelor's GPA wasn't a prerequisite, and having a degree was enough plus I had to give an entrance exam as well as sit for an interview. I got a full 4.0/4.0 GPA in my master's and now am a research intern at one of the top institutes in my country, and have a publication to my name. I also was a research intern in the Research and Development laboratories of 2 companies during the summer and winter. I will be applying this fall to universities abroad, and I wanted to know how much my chances of getting in will be affected before spending money on GRE and university applications.
This varies by country and even by university, but in general, most people will give your recent work more weight in a decision than earlier work. People grow and change and it is usually recognized.
But ultimately, the only way to know for sure is to apply. GRE might help in some places. But a few applications will give you solid information. A wild guess (not a prediction) is that you will be ok.
In the US, M.S. degree grades are expected to be high, since masters programs tend to give relatively high grades because people are paying so much to be there. Undergraduate grades are considered more meaningful because not everyone does well.
Your undergraduate GPA is going to hurt you, especially at big programs that get a lot of applicants. I worked at a lab at well-known Massachusetts university a few years back, and I helped screen graduate applications for one of the engineering programs. They got so many applications that they would essentially throw out anyone below a relatively high GPA cutoff, so with a 2.0 GPA in that program you would not even be looked at. That is an extreme case because everyone in engineering applied to that particular school and they couldn't go through it all. In other places, there are fewer applicants and people have time to more carefully review applicants, in which case having a publication and a lot of additional training looks very good. There are plenty of less famous programs in the US that get fewer applicants and would more holistically evaluate someone with good recommendations, research experience and a publication.
I would put together a list of a few programs you're interested in that are not MIT/Harvard/Stanford/etc. Look for ones with research you would be interested in. Reach out to a few professors you would want to work with, briefly state that you've published and are interested in applying to their program, and you want to know if you'd have a chance. 'I've published in X, I'm interested in Y, I have a M.S degree in Z but I did poorly in undergrad for personal reasons. Am I wasting both of our time applying here'. If you're not spamming everyone but actually emailing people interested in what you do you'll probably get a few answers. It is in their interest to answer since if you're not qualified and you apply they have to read through what you send in anyway. See what they say and reevaluate.
GRE has become dramatically less popular in the US, especially in sciences/engineering/math where everyone does well in math. Depending on your field, you may not even need it at a lot of schools. Double check that before you take it.