Parts of the UK will be battered by wind and rain later this week with forecasters warning of “dangerous” conditions and potential power cuts.