A man has been seriously injured and two homes have been damaged after a suspected gas explosion in Yorkshire.