May well be a simple one for many individuals.

I'm attempting to pass a conditional statement inside a Wordpress Header.php file to express that if you're on the page using the ID of two, then possess a class of 'home' my Banner Div, else leave blank.

<div id="banner" class="<?php if(is_page(2)){ 'home' } else { '' } ?>">
            <?php wp_cycle(); ?>  
</div>

This does not work!

You didn't remember the echo :)

<div id="banner" class="<?php if(is_page(2)){ echo 'home'; } else { echo ''; } ?>">
            <?php wp_cycle(); ?>  
</div>

Wordpress generally uses endif's, like so:

<div id="banner" class="<?php if(is_page(2)) : echo 'home'; else : echo ''; endif; ?>">
            <?php wp_cycle(); ?>  
</div>

In either case, in case your else is empty, you don't have to even make use of it :) In case your if is not true, it will not echo anything, i.e.

<div id="banner" class="<?php if(is_page(2)){ echo 'home'; } ?>">
            <?php wp_cycle(); ?>  
</div>