Equal contribution noted in paper draft without prior discussion
How to handle an equal authorship appearing in the final paper draft which was not agreed upon in advance?


This can be tricky. I strongly suggest that you bring up your concerns with your advisor and figure this out together. The key point here is that you should be collegial, but if you believe the attribution is undeserving you should definitely be assertive and explain why. Your advisor should have consulted with you before making any changes to author contribution (this is something they should know how to handle), but given that they didn't, it's reasonable to bring up the topic. 

I would not change things myself, I would not confront anyone aggressively. If you have other strong publications that showcase your independence then it may be better to let this go as the marginal effect on you is minimal. My experience is that these things rarely get turned back, but I may be mistaken. 


  What are the conditions to equal contribution of authors?


Well, if the two authors have made roughly equal contributions. This is often hard to quantify. Here’s another perspective: the other person in your example, call her Alice, could say: “I implemented a complex algorithm that took effort and skill to do. All that ResearchNewbie did was run a few experiments using this algorithm. I could’ve gotten an undergraduate programmer to run them! Why should they be first authors?”


  What are the implications for the first author, if any?


It’s very important. You should show some degree of independence before you graduate. Graduates who have no lead authorships can be perceived as unready to be an independent scholar.