"After announcing our player list a few weeks ago, we were only missing Serena to complete our dream tournament," Rogers Cup tournament director Eugene Lapierre said in a statement.
"Serena has impressed everyone with the speed at which she was able to return to a high level of play. She has always been a fighter and she is proving it once again."
Williams returned to competition at Indian Wells in March, where she lost in the third round, but has since looked close to her best and is ranked 27th in the world.
The wild card given to Williams, who won the tournament in 2001, 2011 and 2013, is reserved for players who meet specific requirements, including previously having been ranked number one in the world.
(Reporting by Frank Pingue in Toronto; Editing by Toby Davis)
