Hope Powell's side, who were seeded for the draw, also face Cameroon and New Zealand in Group E.
GB will face New Zealand in Cardiff in the first event of the Olympic Games on July 25, two days before the opening ceremony.
Cardiff also plays host to the Cameroon game, before moving to Wembley for the plum fixture against Brazil.
Powell said: "(I am) really excited by the prospect of playing the first event of the entire Olympic Games. It gives us a tremendous chance to showcase our sport and we cannot wait to play.
"Generally I’m quite pleased (by the draw). Any tournament is going to be tough games but it’s a great opportunity to raise our profile against Brazil at Wembley."
Women's world champions Japan face Sweden, South Africa and Canada in Group F while Olympic champions United States take on France, Colombia and North Korea in Group G.
The top two teams from each group and the two best third-placed teams qualify for the quarter-finals.