WordPress 3.6 introduced quite a few new functions that are helpful when working with media attached to a post. One of my personal favorites is a helper function that lets you retrieve the URLs of images that have been inserted as parts of galleries in the post.
The function we will use is get_post_galleries_images(), which will return a multidimensional array of the image URLs belonging to all galleries in the specified post. It returns an array of arrays, one array for each gallery found.
The get_post_gallery_images() return value looks something like this:
Array (  => Array (  => http://localhost/wpms/wp-content/uploads/edd/2013/05/02348_caltonhilledinburgh_1280x1024-190x120.jpg  => http://localhost/wpms/wp-content/uploads/2013/03/2560x1600_Space-190x120.jpg  => http://localhost/wpms/wp-content/uploads/2013/03/2649089468_abb2633bc6_o-190x120.jpg  => http://localhost/wpms/wp-content/uploads/2013/03/02156_orangedays_1024x1024-190x120.jpg  => http://localhost/wpms/wp-content/uploads/2013/03/02348_caltonhilledinburgh_1280x1024-190x120.jpg ) )
With this data, we can easily do something simple like this:
Our output is:
The likely hood of you actually wanting to output the plain URLs is pretty slim, but this is just meant as an illustration of how you can use it. I can imagine the function being very helpful in scenarios where a developer needs to know a list of all assets used.
Note, this will return the URLs of all images included in galleries of the post; if you want to only retrieve images for the first gallery, you can use the get_post_gallery_images() function.