Williams will play China's Peng Shuai in the second round after she dismissed Kurumi Nara of Japan 6-2, 6-3.
Sharapova, who lost to Williams in last year's final, converted six of eight break points to take advantage of Koukalova's eight double-faults.
"Obviously, the first match at a new tournament is always challenging," Sharapova said. "It's always an adjustment, especially after playing indoors last week, but I think it was a good start for me today and I'm happy I was able to win in two good sets."
Sharapova, seeded eighth, will play Christina McHale of the United States next.
Also, fifth-seeded Petra Kvitova needed a third-set tiebreaker to get past Sorana Cirstea 6-1, 7-5, 7-6 (4). Kvitova will play Varvara Lepchenko after she held off Anabel Medina Garrigues 6-4, 4-6, 6-4.
Ana Ivanovic beat Madison Keys 6-1, 7-6 (4) to set up a meeting with fellow Serb Bojana Jovanovski. The 11th-seeded Ivanovic overcame her shaky serve by saving three of four break points.
Two seeded players were eliminated in the first round.
Czech Lucie Safarova came back to beat 12th-seeded Flavia Pennetta of Italy 1-6, 6-0, 6-3, and seventh-seeded Angelique Kerber of Germany retired when trailing to Caroline Garcia 6-3, 2-0.
"I've been feeling my back for a few days now and felt it again in the first set, and it was getting worse as the match went on," Kerber said. "I'm disappointed I had to retire from the match. But I'd like to give all the credit to Caroline, who played an amazing match today."
Other winners included 16th-seeded Sloane Stephens, Italians Francesca Schiavone and Roberta Vinci, Zheng Jie, Maria Kirilenko and Petra Cetkovska.
In the men's first round, 16th-seeded Tommy Robredo lost 6-4, 6-4 to Roberto Bautista Agut.
Guillermo Garcia Lopez beat last year's semifinalist Pablo Andujar 6-2, 2-6, 6-2, and France's Jeremy Chardy rallied past Lukas Rosol 4-6, 6-3, 6-4.
Second seed Novak Djokovic withdrew before the start of the event because of a right wrist injury that had already affected his play at Monte Carlo last month.