In a video circulating on social media, Mr Macron is seen walking up to a barrier on a trip to Tain-l'Hermitage outside the city of Valence.
A man in a green T-shirt slaps Mr Macron in the face before officers quickly move in. The president, meanwhile, is pulled away.
Two men have been arrested following the incident, French media report.
President Macron later called it an "isolated event".
"We must not let ultra-violent people take over the public debate: they do not deserve it," he told French newspaper Le Dauphiné.
The man reportedly shouted "Down with Macron-ism" as he slapped the president, as well as "Montjoie, Saint-Denis" - the battle-cry of the old Kingdom of France, in reference to the banner of King Charlemagne.
In the video Mr Macron briefly returned to the barrier after the incident and once again interacted with the crowd.
"I continued and I will continue," he later told Le Dauphiné. "Nothing will stop me."
As yet the identity and motive of the man are unclear. The local prefecture said he and another individual are being questioned by the gendarmerie, in a statement reported by AFP news agency.
Officers were out in force on the streets of Valence shortly after the slap, according to one French journalist's tweet.