Gold slumped more than 5% after a four-day rally as traders weighed the escalating war in the Middle East against the prospect of a stronger dollar and elevated inflation.