LONDON—U.K. industrial production shrank unexpectedly in May, data showed, as manufacturing output declined and warm temperatures reduced demand for energy, signaling economic growth failed to pick up in the second quarter after a sluggish start to the year.

In monthly terms, production shrank 0.1% in May, according to Office for National...