The U.K. economy contracted in April, adding to a trend of sluggish growth as high inflation acted as a drag on activity.

The U.K. gross domestic product shrunk 0.3% in April from the previous month, the Office for National Statistics said Monday. Economists polled by The Wall Street Journal expected a 0.1% increase.

The decline was driven by a large drop in health-sector output due to the winding down of the Covid-19 related test and trace program, the ONS said. Manufacturing output also fell amid supply shortages as well as rising fuel and energy prices.

April’s GDP negative print follows a 0.1% contraction in March and a flat reading for February, in a sign that economic growth has weakened in the last few months.

Write to Xavier Fontdegloria at xavier.fontdegloria@wsj.com