OK, I see
Let’s say your Template that will eventually display the detail is called ‘item’ and is in the gallery Template Group i.e.
domain.com/gallery/item/
The next segment of the URL will be the url_title of the gallery entry e.g. pop-art
domain.com/gallery/item/pop-art
Now what you have to define is the Row from the Matrix field which will need to be displayed e.g. row 2
domain.com/gallery/item/pop-art/2
So the code which generates the link above might look like: (within the usual EE Entries tag)
{gallery}
<a href="http://{path=gallery/item/{url_title}/{row_id}}">_ {image_title}_ </a>
{/gallery}
Have a look at the Docs for Matrix. There’s a {row_id} tag which you can use in a link: http://pixelandtonic.com/matrix/docs/image-galleries
Now, in the template…
In the template “item”, the row_id can also be used as a parameter in the field’s tag-pair e.g. (assuming your matrix field short name is ‘gallery’)
{exp:channel:entries channel="photo_gallery"}
{title}
{gallery row_id="last_segment"}
<img>
{/gallery}
{/exp:channel:entries}