Second seed Serena Williams squandered eight match points before eventually defeating Klara Zakopalova.
An upset looked on the cards when the underdog from the Czech Republic, ranked 100th in the world, broke a below-par Williams to take a 2-1 lead in the deciding set.
The American, who by that time had squandered five match points, looked down and out but she recovered well to claim four games on the bounce and move to the cusp of a ragged win.
Zakopalova amazingly saved three more match points as she launched a mini-fightback, breaking to go 5-4 down, but Williams clinched victory at the ninth time of asking to seal a 6-3 6-7 (5/7) 6-4 triumph in two hours and 25 minutes.
The 27-year-old Williams, the champion here in 2002, has only lost once against an opponent ranked 100 or lower - that came in her first professional match, against Anne Miller in 1995 in a qualifier in Quebec.
And despite playing far from her best tennis, she looked on course to seal her place in the second round when she held serve to go 6-3 5-3 up.
Williams wasted five opportunities to wrap up the match in the following game and then sent down a double-fault as Zakopalova made it 5-5.
The Czech held her nerve to win the tie-break and looked strong in going a break up in the third.
Williams went on to grab her first clay-court win of the season, after defeats in her opening matches in Marbella, Rome and Madrid, but she was far from impressive.
Her display would not have worried top seed Dinara Safina, who thrashed British number one Anne Keothavong 6-0 6-0 yesterday.
Serena joins her sister Venus in round two, where she will play Virginia Ruano Pascual.