You face three issues.
First, what is the merit to you of being first author versus being co-author on a journal with only two authors? This question is independent of your "feelings" about being first or second. Can you make an objective statement that says your future success in your field of study absolutely depends on you being first rather than second author on this publication?
When you can categorically make a statement that is this strong, you need to make it and do so now. By comparison, when your best statement on this issue is no more than the equivalent of a nebulous understanding that "it gives me more exposure in my field", you should weigh the two other factors more heavily.
Secondly, what is the merit to your advisor of being first author versus being co-author? This is the mirror question to the above. For example, does an upcoming tenure and promotion decision for your advisor depend absolutely on the number of first author papers that he/she has published?
You should at least discover the background for this question. You may claim an injustice is being done to you by your advisor based on the first issue. Yet how far have you gone to appreciate where your advisor stands by mirror comparison?
Finally, what are the rights that each of you bring to the table in order to complete the publication? In your role as the primary worker and documenter for the work (taken at face value as being truly stated), you have a right to negotiate authorship. Your advisor however may be due full acknowledgement due to his/her greater role of having provided all of the ideas behind the research. To what extent did he or she completely initiate the work that you did, proposing all of the approaches that you took and defining all of the analysis that you were to do? Perhaps your advisor does have a greater right to claim first authorship because of his/her greater role in setting, maintaining, and directing the success of the work.
These issues are what you face at a negotiation table. It is not an argument table ... it is a negotiation table. The negotiations should be done up front, hopefully before the publication is started.
In practice, at this point, you should first decide whether your case has strong merits on the three issues above. Regardless of your decision, you should still talk with your advisor to clarify what you understand about them. You should strive to present your case honestly, not argumentatively. You should do so even with the understanding that you may have accept the pre-ordained outcome of being a second author, not a first author. At best, you may make a strong and sufficient objective stand to sway your advisor to appreciate the greater need that you have to be the first author. At worst, you will leave the presentation as a second author but knowing that you will not be carrying an unreconciled resentment about what you could have done but did not do.
Finally, discussing this with your advisor may not be an easy task. You may already face a sense of being held hostage to the power of your advisor to sign away your thesis or your future career. Do not let this fear put you in a place where you believe that you cannot at least assemble and put forward an honest, objective, and balanced case for your views. You may never change your advisor's mind regardless of the strength of your case. When you learn to state your case with no need to win it under situations of authority, you will learn how to do it better the next time at the outset when it may count even more.