Echo a div to header.php from functions.php

The wp_head() template tag is intended to fire in the HTML document head, rather than the page header, and is used to output script and stylesheet links and tags, and other similar things in the HTML document head.

It should appear immediately before the closing HTML </head> tag, like so:

<?php wp_head(); ?>
</head>

If you want to be able to output something within the HTML markup itself, you have a couple options:

  1. Use get_header( $slug ) to output a custom header.php in a given context. For example, if you want your extra div to output on static pages, then in page.php, you can call get_header( 'page' ), which will then load header-page.php.
  2. Add in a custom action hook, and then write callbacks for that hook:

    <div id="header">
        <div id="masthead">
            <div id="branding">
                <?php do_action( 'wpse72753_branding_top' ); ?>
    

    Then you can define a callback to hook in to that location:

    function wpse72753_add_branding_div() {
        if ( is_page() ) {
            ?>
            <div><!-- some content --></div>
            <?php
        }
    }
    add_action( 'wpse72753_branding_top', 'wpse72753_add_branding_div' );
    

There may be other similar solutions, but the bottom line is: WordPress doesn’t take control over the HTML structure of the presentation layer; that HTML structure is entirely Theme-dependent. So, whatever solution you implement will have to be via the Theme.

Edit

Re: this comment:

Theoretically could you echo JQuery code into the head via functions.php to create the div?

Absolutely! You just need to hook a callback into wp_head:

function wpse72757_add_head_script() {
    if ( ! is_admin() ) {
        ?>
<script type="text/javascript">
// script code goes here
</script>
        <?php
    }
}
add_action( 'wp_head', 'wpse72757_add_head_script' );

This callback would go in functions.php, or in a site Plugin, etc.