I'm not sure I agree with doing this, since media and galleries have such different functionalities. E.g. a media item is only chosen once, whereas galleries can be extended, pruned, rearranged, etc. The media display options are quite different from the gallery display options too, and a media item might not even be an image. I think a single dialog that incorporated all of this would lead to a confusing user experience, with too many alternative workflows and options being disabled according to whether whether media or gallery behaviour was required.
I suspect the real problem is that the media dialog is more mature, so a better solution in my opinion would be to work on improving the gallery dialog.