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é.