How to make a block visible only to one page
There are Visibility settings for blocks in Drupal. One of options is "Show block on specific pages". Select "Only the listed pages" and input user/*/galleries