Add code to header based on category for specific posts?

Have a look at in_category() in the codex. You would either insert this into your theme within the post loop or create a function in functions.php that’ll insert the image and text you want when a post from that category is displayed on screen.

Here’s a test bit of code I put together that works well in the Twenty Fourteen theme. I put it inside the loop in content.php as a quick test.

if (in_category(1)) { 
    the_title();
    echo "<p style="font-size:80px">Category 1 Test</p>";
}