You need to update the text content of the tag; you can do this with e.g. jQuery at runtime. This is the preferred way if some tags, and only those, change during the lifetime of the application page, and you do not wish to reload the whole page from scratch.
In this case, from listPagPrinc.php, you can output some Javascript code:
echo <<<JAVA1
<script>
alert("Ciao, mondo");
</script>
JAVA2;
or in your case using jQuery
echo <<<JAVA2
<script>
$('#statoPag h3').text("Errore!");
</script>
JAVA2;
Very likely the call will need to be inside a jQuery onDocumentReady function to be sure that it executes.
A better and faster way (and as @arkascha observed, nicer and more robust): you can generate the header from listpagPrinc.php or from a wrapper.
// file listPagPrincWrapper.php, replace your current file
// Ideally listPagPrinc could return a text value. In case it is
// printing it, as seems likely, we capture the output. This way
// we don't neet to modify the existing code.
ob_start();
include('procedure/listPagPrinc.php');
$lpp = ob_get_clean();
// At the end, we do the output part.
print <<<HTML
<div id="statoPag">
<h3> Stato : {$error}</h3>
</div>
<div class="headerCont">{$lpp}</div>
HTML;
inlude()that file earlier and save its content in a buffer, then fill your view later with that variable and the buffered content. We would need more code to help more.