One way you could get the error message to your custom login page would be to use wp_login_failed
hook. It could look something like this:
add_action( 'wp_login_failed', 'my_login_fail' ); // hook failed login
function my_login_fail( $username ) {
//redirect to custom login page and append login error flag
wp_redirect(home_url( '?page_id=4' ) . "&login_error" );
exit;
}
Obviously you should modify wp_redirect
depending on permalinks you are using.
Then in your custom page template you can check the login_error flag and display error message:
if (isset($_GET['login_error'])){
//print error message or do something else
}