Williams, pursuing her fourth straight Grand Slam title, overcame 55 unforced errors in her opening-round match at Melbourne.
Also, Lleyton Hewitt, the men's top seed and local hope, had a tough time in his opening match before holding off qualifier Magnus Larsson of Sweden, 6-3, 3-6, 6-1, 6-7 (3-7), 6-2.
Williams was very close to becoming only the second top-seeded woman in the Open Era (post-1968) to lose in the first round at the Australian Open. Flustered by her opponent's varied lefthanded shots, she was three points from defeat in the second set and later was down a break in the third before pulling out her 22nd consecutive match win at a major.
"I made too many errors," Williams said. "I didn't play anywhere near to my ability, even the way I was playing in Perth (two weeks ago at the Hopman Cup), I didn't even play anywhere near the way I was playing there, so it was just me making errors and not attacking and getting a little tense, a little tight and just not doing what I need to do. The problem was me not looking at the ball or hitting late and just not doing my techniques right. I never thought I was going to lose the match. The thought never crossed my mind. I did think, 'Gosh, this is bad,' but I didn't think I was actually going to lose."
Loit, ranked 56th in the world, became the first player to take a set from Williams in a Grand Slam tournament since Jennifer Capriati won the opening set of the semifinals at last year's French Open.
"It's the best match I've ever played on a tennis level and feeling level," Loit said. "I was believing in it from the beginning. I played well the first set. I even played very well in the second set. I was very close. I really thought until the end, why not, that I could do it."
The year's first major was on the verge of losing two of its top three seeded women when Williams was at 40-30 on serve at 5-6 in the second set, but she hit a service winner to force a tiebreaker.
Williams then lost her serve in the fifth game of the decisive set, but broke right back and again in the 12th game to avoid joining Virginia Ruzici as top-seeded first-round losers at the Australian Open.
"I just had a bad today," said Williams, who was experiencing pain in her right knee. "I haven't had a bad day in a little while. Actually, it's been a little while since I've actually had a bad match. Usually, I play good matches. Today's just one of those days. I'm just happy I was able to pull that through."
Ruzici fell to Mary Sawyer in the opening round in 1979, a time when many of the world's top players did not make the trip to Australia.
Capriati, the third seed and two-time defending champion, was ousted Monday by Marlene Weingartner.
While not in a position to claim a legitimate Grand Slam (all four major tournaments in the same calendar year), Williams is trying to become the first woman to win four consecutive majors since Steffi Graf in 1993-94.
Williams' only loss in her last four majors was a final setback to older sister Venus in the 2001 U.S. Open. After missing last year's Australian Open with a right ankle injury, Serena avenged the defeat by beating her sibling in the finals of the French Open, Wimbledon, and the U.S. Open.
One player who feels she can break the Williams sisters' domination of the WTA Tour is fourth-seeded Kim Clijsters of Belgium, who routed Samantha Reeves of the U.S., 6-2, 6-1, in 62 minutes.
"I don't know how close I am," Clijsters said. "I just try to get the best out of my game and then we'll see. I try to get as fit as I can and to be able to compete with all the other top girls that are up there. I've beaten Serena and Venus before. Each time I play against them, it's a different match."
Clijsters captured her 11th career title last week at Sydney, and has won 19 of 20 matches since a semifinal loss to Anastasia Myskina in September at Leipzig. Since that defeat, she has won four titles, including the season-ending championship at Los Angeles over Serena Williams.
Clijsters' boyfriend, Hewitt, came close to his second straight first-round elimination at Melboure. Last year, suffering the aftereffects of chicken pox, he became the first top seed in the Open Era to lose in the first round.
"I'm happy to be through to the second round," Hewitt said. "A win's a win for me. I think sometimes it's good (to have a tough one). It's a little bit of a wake-up call in some ways I guess."
The native of Adelaide, Australia is trying to become the first male from his country to win the Australian since Mark Edmondson in 1976.
"It's a lot of relief after last year I guess, more than anything, losing in the first round last year and feeling shocked at the whole situation," he said. "I think of the sour taste left in my mouth, and I could come out here (now) and get rid of it. I'm just going to get better and better from now on."
Hewitt won five titles and finished 2002 ranked No. 1 for the second season in a row. He claimed his second career Grand Slam crown at Wimbledon, but started this season with middling results, going 2-2 at the Hopman Cup.
Marat Safin, the men's third seed and 2002 finalist, put his sore shoulder to the test in a 6-4, 4-6, 6-3, 6-4 victory over Raemon Sluiter of the Netherlands.
Safin withdrew last week from the quarterfinals at Sydney because he was unable to serve at full strength. However, he received treatment over the weekend and declared himself fit after practicing Sunday.
"I'm taking care of it," Safin said. "I'm taking some anti-inflammatories, Vioxx, but it's OK. The pain is going away. It's much better, much better. Like next match, I think will be perfect then."
Other winners included No. 6 Roger Federer of Switzerland; No. 7 Jiri Novak of the Czech Republic; and No. 9 Andy Roddick of the U.S., who overcame Zeljko Krajan of Croatia, 6-7 (9-11), 6-2, 7-6 (7-0), 6-3.
No. 15 Alex Corretja of Spain became the highest men's seed to exit. Feliciano Lopez handed his countryman his second straight first-round loss at Melbourne, 6-7 (3-7), 7-6 (11-9), 7-6 (8-6), 6-3.
Among other winners on the women's side was sixth-seeded Monica Seles of the U.S. The 29-year-old American has won the Australian eight times, and owns a 42-3 record at Melbourne, but has not played an official WTA Tour match this season. She won an exhibition two weeks ago in Hong Kong.
No. 8 Anastasia Myskina of Russia was a winner, as were No. 10 Chanda Rubin of the U.S.;
and No. 11 Magdalena Maleeva of Bulgaria.