Putting the verb first in a negative question does not mean you show surprise - your original question "Didn't you go to school today?" is perfectly normal and how I would ask this. "You didn't go to school today?" [rising inflexion at the end] does indicate surprise.
In your second example [and no, do not include "by chance" in this question], I can see no real difference in politeness between asking "Are you Bill Gates?" and "Aren't you Bill Gates?". If you asked "Are you by any chance Bill Gates?", I would feel this was a more formal approach. All leave the other person free to say "Yes, I am" or "No, I am not".
In English you can also ask "Are you not xxxx?" - again it is more formal and will not be heard too often.