More than 300 Indians were barred from Canada in 1914 after an immigration dispute, only for some to be killed in protests on their return to India.
"Today I rise in this House to offer an apology on behalf of the government of Canada for our role in the Komagata Maru incident," Trudeau said in parliament, referring to the name of the ship.
"More than a century ago a great injustice took place," he said.
The ship sat anchored offshore for two months before being escorted out to sea under the guns of a Canadian navy cruiser in July of that year.
Also Read
Upon their return to India, passengers were arrested and British colonial officials planned to send them back home to the northern state of Punjab.
Some refused to go and 20 were killed when police opened fire on a demonstration.
"Those passengers, like millions of immigrants to Canada before and since, came seeking better lives for their families, greater opportunities, a chance to contribute to their new home. Those passengers chose Canada and when they arrived here, they were rejected."