He was returning to his bus after visiting a brewery when he was struck by small stones. He was not injured.
Mr Trudeau called a snap election in mid-August, in the hope of gaining a majority government for his left-of-centre Liberal party.
But his campaign has been disrupted by demonstrations against Covid-19 vaccine mandates and other restrictions.
Just over a week ago, the prime minister was forced to cancel an election rally after a crowd of angry protesters ambushed the event.
Speaking to journalists on his campaign plane after the incident in London, Ontario, Mr Trudeau said he may have been hit on the shoulder and compared the incident to when a woman threw pumpkin seeds at him in 2016.
According to a reporter with Canada's CTV National News, two people travelling on a media bus were also hit by the gravel, although they were not injured.
Erin O'Toole, the leader of the opposition Conservative Party, described the incident as "disgusting".
"Political violence is never justified and our media must be free from intimidation, harassment, and violence," he tweeted.
Mr Trudeau's plans for vaccine mandates have become a key issue ahead of the 20 September election.
Last month, the government announced that all civil servants - including workers in federally regulated sectors, like rail - must be vaccinated by the end of October or risk losing their jobs.
Commercial air, cruise and interprovincial train passengers must also be vaccinated to travel.
Canada has one of the highest Covid vaccination rates in the world.