Marie Antoinette first saw Madame du Barry, King Louis XV's mistress, at a dinner at La Muette. It was the day before her wedding to the Dauphin, and the mistress' presence at the event had caused a lot of discontent. Not that the King cared. “She’s pretty and she pleases me,” was all he would say when people complained to him about Madame du Barry. And pretty and charming she was indeed. Marie Antoinette noticed her and asked the Comtesse de Noailles who she was. The embarrassed Comtesse replied that "the lady was there to give pleasure to the King"*, to which the young Dauphine exclaimed: “Oh, then I shall be her rival, because I too wish to give pleasure to the King.”
It wouldn't be long before Marie Antoinette discovered how Madame Du Barry exactly pleased the King. And when she did, she refused to speak to her. This was due, in part, to her Catholic upbringing and prudish and chaste nature. The court of Maria Theresa was very different from Versailles. At Vienna, men, including the Emperor, had mistresses, but they didn't parade them so openly in front of everyone. Marie Antoinette was disgusted at the behaviour of the French and felt sorry for the King's weakness for his mistress.
In vain, Count Mercy explained to her that things were done differently in France. Marie Antoinette, egged on by the King's daughters, who despised Madame Du Barry, remained stubborn. The young Dauphine, alone and lonely in a foreign court, spent a lot of time with her husband's aunts and was easily led by them. The old ladies weren't particularly fond of Marie Antoinette, whom they called L'Autrichienne, either, and they were all too happy to led her "into offending Louis XV by simply upholding decency"*.
But Marie Antoinette couldn't afford to offend the King. Her husband still refused to consummate the marriage, which left her in a vulnerable position. Her mother Maria Theresa and Count Mercy realized how important it was for Marie Antoinette to be in favour with the King, and that meant acknowledging Madame Du Barry. They pointed out to her that, by refusing to even greet her, she was publicly questioning the King's behaviour. All she had to do was say a few words to her.
At last, Marie Antoinette was prevailed upon to give in, but the King's daughters weren't willing to let her do so easily. Minutes before the brief greeting was about to take place, they summoned the young Dauphine to join them, providing her with a good excuse to avoid Madame Du Barry.
But on New Year's Day 1772, Marie Antoinette finally surrendered. She approached Madame Du Barry, amid a big crowed of courtiers, and, speaking in her direction, remarked “There are a lot of people here today at Versailles.” The deed was done, the King pacified.
Marie Antoinette, though, was furious she had to give in and vowed never to speak to the courtesan again. She wrote to her mother than she had addressed Madame Du Barry, sacrificing "all her prejudices and repugnances", only to avoid a rift between the French and Austrian royal houses, and only after she had been reassured that there was no dishonor in her gesture.
Marie Antoinette kept her resolution and, in the future, whenever Madame Du Barry was present, she would make general remarks in her direction. She may not have been speaking directly to her, but she wasn't avoiding her either, and this ambiguity was enough to please the King. And this made the young Dauphine realize how the King's daughters weren't always right, and how dangerous it could sometimes be to follow their advice.
Notes: *Marie Antoinette: The Journey by Antonia Fraser