Federer needed just 52 minutes to eliminate Canada's Polansky, who beat 2013 Wimbledon finalist Jerzy Janowicz on Monday. The second-seeded Federer had a bye into the second round.
Gulbis moved into the second round with a 6-3 6-4 win against Joao Sousa of Portugal. Gasquet beat local favorite Vasek Popisil 7-5 7-5, and Fognini defeated Russia's Mikhail Youzhny, 6-4 6-3.
"He has an extra motivation because it's being home," Gasquet said of Popisil. "It's the same when I'm playing in France. But yes he had big expectations on him, especially here in Toronto."
Andreas Seppi defeated Canadian qualifier Brayden Schnur 6-3 6-3 after a rain delay of more than two hours. Seppi next faces Ivan Dodig, who upset 10th-seeded John Isner on Monday night.
"I'm definitely excited for tomorrow," Sock said of facing Raonic. "The juices will be flowing. He got me in my home country last week, so I'm going to try to maybe get some revenge."
Raonic beat Sock in straight sets at Wimbledon and then again last week at the Citi Open in Washington.
"He just started reading my serve in the second and third set," Dancevic said. "I couldn't get any more free points on my serve, my serve percentage dropped down a little bit and he just started playing better and better as the match went on."
Nick Kyrgios downed Santiago Giraldo 7-6 (3) 7-5 and next plays eighth-seeded Andy Murray. Gael Monfils beat Radek Stepanek 6-3 7-5, and Lu Yen-hsun edged Marcel Granollers 7-6 (6) 7-5.
