Diego Pineda provided the insurance goal with a tap-in in the 92nd minute for the two-time defending confederation champions.
"Once we created some chances and got the ball moving we realized we can play with them and we're a good team as well," said Canadian captain Luca Gasparotto. "We're disappointed with the result but all the boys heads are up and we're focused on the next game and it's still early days and anything can happen."
Mexico, which thumped Cuba 9-1 in its opening match, tops Group B with Canada (1-1-0) in second spot. The Canadians were coming off a 3-1 victory over Haiti.
Canada is the last team to beat 12-time champion Mexico in CONCACAF U-20 play, a 2-0 decision in March 2009.
"The difference in the end was the little bit of better quality in the final third to create chances and test our goalkeeper more than we tested them," said Canadian head coach Rob Gale. "So we knew it was going to be down to the little moments and congratulations for them. They got the victory."
Canada plays El Salvador on Thursday.
Four teams from the 12-country CONCACAF championship will advance from the tournament to represent North and Central America and the Caribbean at the FIFA U20 World Cup, which kicks off May 30 in new Zealand.
The two group winners will book their ticket to New Zealand. The second-and third-place teams in each group will cross over to play for the two remaining World Cup berths.
Canada has not played at the world under-20 championships since 2007 when it hosted the event.