Non-consensual authorship order change after paper submission?
You agreed on something, worked together and he then changed the conditions without your consent. That is not ok in all, neither in academia nor in any business.
However, both in academia and everywhere else, it happens. The question now is: What can you do? Ultimately, you have to decide for yourself. To help you with that, here are some ideas:


He might actually be right that you contributed less than anticipated. Still, changing the order in the last second without giving you the chance to earn first author is not a nice move.
You can simply accept it and be happy to have a (maybe even the first?) publication, even if not at first author. On the other hand, this might mean that he will try the same thing next time.
You can confront your advisor about it. Depending on how he answers, you might decide how to proceed.
You can contact and notify the conference about it. This might mean that you loose the publication and get on your advisors bad side, though.
You can ask others at the institute what they think about it. Maybe they already know the tricks your advisor plays? This might also backfire if you badmouth him to much.


As you see, all options also have drawbacks. Personally, I would try to get a detailed explanation out of him. Don't blame him, rather try to make clear that you want to know your mistakes, want to know how you could have contributed more, to work better on your next paper. If you are lucky, he will point out your weak points, you will agree that you could have done better and everything gets resolved.