Jóhannesson, a former history professor, said he was immediately rushed to a hospital where he received stitches.
The president of the island nation with a population of 345,000 holds a largely ceremonial role.
Jóhannesson, who is not a member of any traditional party, has enjoyed high approval rates since he was elected in June 2016.
During the Iceland football team’s success as the smallest nation at Euro 2016, Jóhannesson attended every match in France, sitting with fans who created such a noise with their drums, hand-clapping and chants that they became a phenomenon.
Iceland is set to hold a snap legislative election on 28 October after the coalition government collapsed because of the prime minister’s cover-up of his father’s involvement in a legal row.
Bjarni Benediktsson’s Independence party reportedly tried to conceal a letter written by his father, Benedikt Sveinsson, to help a friend convicted of child sexual offences have his criminal record cleared.
The Independence party formed a coalition with two other parties after elections last year that were triggered by the collapse of the previous government following the Panama Papers offshore tax revelations.
More about: #Iceland