The Russian favorite sprayed shots to all parts of the court at Roland Garros, giving her opponent few chances on Day 2 of the tournament.
"I was just playing point by point, game by game, and it ended up like this," said Safina, half of the only brother-sister combination alongside Marat Safin to have served as the No. 1-ranked players in the world.
Maria Sharapova's bandaged right shoulder held up despite a shaky start, sending her into the second round with a 3-6, 6-1, 6-2 win over Anastasiya Yakimova of Belarus.
Keothavong had a couple chances against Safina on center court, but she wasted two break points in the third game of the first set and led 40-0 in the fourth game of the second but couldn't hold on.
"When that's happening to you all you want to do is get on the scoreboard, but I wasn't able to do that," Keothavong said. "It just kept getting harder and harder."
During the changeover for the final game, Keothavong sat in her chair with a French Open towel draped over her head. She emerged from the short break and quickly trailed 0-40, giving Safina three match points.
But Keothavong saved them all, on unforced errors from Safina, and even held two game points.
Safina wasted a fourth match point by hitting long and converted the fifth with a forehand winner down the line.
"After I [shook] her hand, she said: 'At least you could give me one game,'" Safina said. "I could imagine it's not nice to feel [like that] on the court, but I was just so into myself."
Safina took over as the top-ranked women's player in April, but she has yet to win a Grand Slam title. She lost in last year's French Open final and also came within a match of winning the Australian Open this season.
Williams, a seven-time Grand Slam champion, won the match's first five games, while Mattek-Sands asked for a medical timeout during the first set so a trainer could look at her right wrist.
"I'm definitely a third-set player," Williams said. "Once I get to the third set ... I feel a new level coming."
Williams has never won the French Open, but she did reach the final in 2002 when she lost to little sister Serena. Overall, Williams holds a 36-12 record at Roland Garros, giving her the most wins of any player in the women's draw at the tournament.
Williams was upset in the third round in three of the last four years. In 2006, she reached the quarterfinals.
Sharapova was broken three times in the first set of Monday's match, but she opened the second with four straight wins before being broken once again.
"She was probably a little nervous," said Yakimova, who is 4-12 in Grand Slam play. "And she hasn't had much practice, so she was missing more than usual."
Before the start of the next game, Yakimova called for a trainer to work on her lower back.
"I started pretty lousy," said Sharapova, playing a Grand Slam match for the first time since last year's Wimbledon. "I was just a little sloppy. But I totally changed it around, and I started playing a lot better and more aggressive."
The unseeded Russian made her season debut in singles this month in Poland, reaching the quarterfinals in her first tournament since taking time off because of a shoulder injury.
"This is the first time in my career where I can really say I don't have any expectations," she said. "I don't know how things are going to work out. I don't know what's going to happen tomorrow, how my shoulder is going to feel."
After not knowing for months whether she would ever be able to return to the big stage again, Sharapova was delighted to be back in Grand Slam action.
"If I was a mentally weak person or individual, I wouldn't be here today," Sharapova said. "I'd be on some island ... with a nice cold pina colada and a nice cold towel they hand around at the pools.
"But I love being here ... There's no better feeling than going on court when they call your name and, especially in these days, to know that you have an opportunity to go out and play and have a job," she said.
The three-time major champion needs only to win the French Open to complete a career Grand Slam.
No. 12 Agnieszka Radwanska of Poland, No. 13 Marion Bartoli of France, No. 15 Zheng Jie of China, No. 20 Dominika Cibulkova of Slovakia, No. 22 Carla Suarez Navarro of Spain and No. 29 Agnes Szavay of Hungary also advanced to the second round.
In upsets, No. 23 Alisa Kleybanova of Russia lost to Polona Hercog of Slovenia 6-2, 4-6, 6-1; No. 14 Flavia Pennetta of Italy was eliminated by Alexa Glatch of the United States 6-1, 6-1; No. 26 Anna Chakvetadze of Russia lost to Mariana Duque Marino of Colombia 3-6, 6-4, 6-4; and No. 17 Patty Schnyder of Switzerland fell to Kateryna Bondarenko of Ukraine 6-4, 6-3.
Information from The Associated Press and Reuters was used in this report.