Wild card Barty, 17, was given the toughest of assignments against the world number one and, not surprisingly, could offer little resistance under the lights on Rod Laver Arena.
Williams' 6-2 6-1 victory took only 57 minutes as she eased through to a second-round meeting with Serbia's Vesna Dolonc.
There were huge cheers as former Wimbledon girls' singles champion Barty, 15 years her opponent's junior, saved a break point to hold serve in the first game.
But that was the only time she was ahead in the whole match as Williams' extra power versus the petite teenager soon told.
Barty held her arms aloft when she got on the board in the second set to make it 1-4, but that proved to be her last hurrah, although she was applauded off the court in a nice touch by Williams.
The American, who hit 31 winners in the 15 games, is the clear title favourite as she bids for her first Australian Open crown in four years.