Actually, it could be either agency - Secret Service or State Department. I've never figured out what determines which agency covers what head-of-state, but the Secret Service does indeed protect foreign dignitaries.
According to the USSS, they are authorized to provide protection to "Visiting heads of foreign states or governments and their spouses traveling with them, other distinguished foreign visitors to the United States, and official representatives of the United States performing special missions abroad."
- Chris