The classic way to do this would be to add a query parameter to the galleries page URL before you open it like this:
/galleries?placeID=3456
Then, you can access that placeID
either on the server or in the galleries page javascript (whichever you want).
In the galleries page, you would then have some javascript that runs when the page is initialized. That javascript would examine the query parameters on the URL and act accordingly.
$(document).ready(function() {
// examine window.location.search here to look at the query parameters
var matches = window.location.search.match(/placeID=(.*?)(&|$)/);
if (matches) {
var placeID = matches[1];
// do whatever you want with placeID here
}
});