WordPress won’t expand the shortcode if you use two sets of brackets instead of one:
[[gallery]]
will render as [gallery]
.
That way you don’t have to worry about switching to the visual editor. Only problem is that you’ll still get two sets of brackets if the plugin that handles that shortcode is disabled. Fortunately there’s a ticket for this and it should be fixed soon.