Add the following lines to your WordPress Theme’s template functions.php file (For example, functions.php file for a Theme named “default” would probably reside in the directory wp-content/themes/default/functions.php) or create it as a Plugin by filling the additional Standard Plugin Information:
add_filter('gallery_style', create_function('', 'return "<div class=\'gallery\'>";'));
And these are the classes for your stylesheet:
.gallery {}
.gallery-item {}
.gallery-icon {}
.gallery-caption {}