The European Central Bank raised borrowing costs and warned that inflation could remain high for an extended period.