Get title of page from URL

WordPress has a function called url_to_postid that may work in this situation. You can try the following (untested):

<?php
    $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
    $back_id = url_to_postid($_SERVER['HTTP_REFERER']);
    if( $back_id > 0 ){
         $back_title = get_the_title( $back_id );
         echo "<a href="https://wordpress.stackexchange.com/questions/211840/{$url}">Go back to the {$back_title}</a>"; 
    }