Handling Body class based on Template

I’m not sure if I understand your question correctly, but…

If you want to set body classes based on current page, then you can use this code

function my_body_class( $classes ) {
    if ( is_home() ) {
        $classes[] = 'wbody';
    } else {
        $classes[] = 'gbody';
    }
    return $classes;
}
add_filter( 'body_class', 'my_body_class' );

Of course you can use other conditions in there and the list of Conditional Tags might come in handy to.