This paper is a continuation of Braverman and Kazhdan (Ann Math (2) 174 (3): 2011) in which the first two authors have introduced the spherical Hecke algebra and the Satake isomorphism for an untwisted affine Kac-Moody group over a non-archimedian local field. In this paper we develop the theory of the Iwahori-Hecke algebra associated to these same groups. The resulting algebra is shown to be closely related to Cherednik's double affine Hecke algebra. Furthermore, using these results, we give an explicit description of the affine Satake isomorphism, generalizing Macdonald's formula for the spherical function in the finite-dimensional case.