Okay, so i've been very silly and I've messed with the code without fully knowing what I was doing. I know - stupid! I've taken the following out:
<p class="gallery-text"><?php printf( _n( 'This gallery contains %2$s photo →', 'This gallery contains %2$s photos →', $total_images, 'gridiculous' ), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'gridiculous' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
and now I don't remember exactly where exactly it goes! The whole site is currently down :( Any help would be great appreciated!