The American seven-time Grand Slam champion was handed a wildcard for Melbourne, five years after she last appeared at the major.
It attracted some flak amid concerns that it deprived a younger player of the opportunity, compounded by Williams losing first-round matches at both her warm-up tournaments.
The ageless veteran showed she still has what it takes in patches, pushing 24-year-old Serbian Olga Danilovic all the way before losing the last six games to crash out 6-7(5), 6-3, 6-4 in a gruelling 2hrs 17mins.
"Not easy," said Danilovic. "I told myself before the match, I really want to take this moment, and I cannot say enjoy, because it's tough to enjoy at the moment on court.
"But these things don't happen every day, and playing against Venus Williams is something that I cannot take for granted.
"There was a lot of nerves. I just said to myself, 'Okay, just play, just take everything out and just play point by point'.
"I'm very happy I managed to get this one, but it was such a pleasure playing such a legend."
After getting a standing ovation, the former world number one Williams, now ranked 576, made a promising start, breaking the 69th-ranked Danilovic's first service game.
But the Serb quickly struck back with a lucky net cord helping her level the set.
Williams sent down powerful serves and showed no issues moving around the court as the set moved to a tiebreak, where she fell 2-0 behind but rallied to clinch it with a clinical forehand winner.
Danilovic managed to get an early break in the second set and Williams had no answers, sending it to a decider, where the American raced 4-0 clear.
But she lost focus, allowing Danilovic to battle back to 4-4 before a huge 14-and-a-half-minute ninth game that ebbed and flowed.
Williams had six game points, but failed to convert, and the Serb took the game on her second break point before serving out for the win.
Williams, who first graced Melbourne Park in 1998, has played only sporadically in recent years.
A five-time Wimbledon champion, she was an Australian Open singles finalist in 2003 and 2017 and won the doubles title four times alongside sister Serena.
Japan's Kimiko Date, who was 44 when she lost in the first round in 2015, previously held the record as the oldest woman to play singles at the Australian Open.
