map in esri.dijit.BasemapGallery should refer to the map object used in your app, while _maps is an array of map objects. Matter of fact, _maps only contains one map object. Don't know why need an array here. Anyway, here is the change you can make.Try to change: var basemapGallery = new esri.dijit.BasemapGallery({
showArcGISBasemaps: true,
map: _maps
}, "basemapGallery");
To:var basemapGallery = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true, map: _maps[0] }, "basemapGallery");