If you roll 18 intelligence, a gnome will be a better choice for a wizard than an orc, due to the +2 Int binging you up to 20. If you roll a 12 intelligence, a gnome will be a better choice for a wizard than an orc, due to the +2 Intelligence bringing you up to 14. In either case, the gnome is the better choice if you play a wizard.
EDIT: Sorry, I misread you initially. Yes, it is possible for an orc wizard to end up with a higher intelligence than a gnome wizard if you choose race and class first and then roll in order (for some reason). But, gonme would still always be a better choice than orc for a wizard in that case, because the racial +2 means you will have a better chance of getting a higher total Int score as a gnome.