The fifth-seeded Williams was two points from victory nine times in the second set, including leading 5-1 in the tiebreaker. But Razzano won six straight points to force a third set, and then took control of the match.
"I made so many errors today, which isn't the game I was playing in the past," Williams said. "That's life."
Williams entered the day with a 46-0 record in first-round matches at Grand Slam tournaments. She had been looking for her 14th major title, and second at Roland Garros.
On clay this year, Williams was 17-0 heading into the match with two titles. But she pulled out of her last match in the semifinals of the Italian Open with a bad back.
"I didn't feel anything abnormal," Williams said Tuesday when asked about the injury. "I was 100 percent healthy."
Razzano jumped out to a 5-0 lead in the third set, but Williams won two straight games before what turned out to be an epic, 23-minute eighth game.
Williams had five break points in that final game.
"I was just thinking, if I can break here we'll be back on serve," Williams said. "You know, those are the kind of things that are going through your head."
Razzano saved all five, however, and then converted her eighth match point to eliminate one of the tournament favorites.
"I had to dig deep against a great champion and you could see until the end that she gave away nothing," Razzano said. "I had to go and get the victory. I had to be mentally strong, and I gave my everything."
Razzano's coach and fiance, Stephane Vidal, died about a week before last year's French Open. Razzano played anyway, and lost in the first round.
Earlier, Rafael Nadal began his quest for a record seventh French Open title in style, wearing a pink shirt and pink shoelaces.
He won easily, too.
He's not worried about the record just yet, though.
"We are in the second round," Nadal said. "I have enough work to do thinking about the next round, and not think about if Bjorn will be here or if I'm going to play the final. That's day-by-day and we'll see."
Against Bolelli, Nadal made only 18 unforced errors, fewer than half as many as his opponent. From 2-2 in the first set, Nadal won eight straight games to take control.
"I think I did what I had to do today," Nadal said. "I played probably with less stress or nerves than in other first rounds in the past."
And after a short blip in the second set, Nadal won eight of the last nine games.
"I tried to play aggressive with the forehand, with the serve, but today I miss a lot," Bolelli said. "He's strong. I mean, I didn't have a chance to make the match even."
Maria Sharapova was nearly perfect in her match, winning all 12 games to produce a "double bagel." And Wimbledon champion Petra Kvitova advanced by beating junior Wimbledon champion Ashleigh Barty 6-1, 6-2.
Sharapova routed Alexandra Cadantu of Romania 6-0, 6-0 on Court Suzanne Lenglen, needing just 48 minutes to advance to the second round. She finished the match with 18 winners, while Cadantu had zero, but had to save three break points.
"No matter how good or bad they're playing, you still have to win that match," Sharapova said. "It's always about who takes their chances."
Sharapova, who lost in this year's Australian Open final, is looking to complete a career Grand Slam by winning the title at Roland Garros.
The Russian has won the other three Grand Slam titles, but she has never reached the final at Roland Garros. Last year, however, she equaled her best result by making the semifinals.
"I feel like with every year I have improved and I enjoy it much more," Sharapova said. "I think I learn a lot more about the game and the point construction. I feel like I'm moving a lot better than I did years previously, which has helped me a lot in the recovery process within the point."
She moved well enough against Cadantu, a 22-year-old Romanian who was making her French Open debut.
"For me, to have that big crowd, it was a lot," Cadantu said after playing on the second biggest stadium at Roland Garros. "I enjoyed it a lot."
Kvitova lost the opening game in her match against the 16-year-old Barty, but then won six straight in the first set and again raced through the second set despite being broken once.
"She has a big serve with kicks and good forehand," Kvitova said of the Australian teen. "She has very good touch."
The left-handed Czech won her first Grand Slam title at Wimbledon last year, and then won the WTA Championships. Although she has yet to win a title in 2012, she is seeded fourth at Roland Garros and is expected to make it deep into the tournament.
Barty is the youngest player in the draw at the French Open, one of only eight teenagers entered. The Australian received a wild-card invitation to compete in Paris.
"It was tough out there today," Barty said. "I didn't play my best tennis, but she didn't allow me to. I was out there giving it my all, but unfortunately just didn't come out on top today."
Copyright 2012 The Associated Press.