Film-makers chose the 11th century cathedral as the perfect setting for scenes in Hogwarts School of Witchcraft and Wizardry.
It will be the third time the Cathedral and nearby King’s School have been used for the Potter movie series.
Warner Brothers’ crews pitched up tents around the grounds of the cathedral and neighbouring King’s School last month and have been preparing since.
Celebrities, including Daniel Radcliffe, who plays the eponymous hero, Alan Rickman, and Dame Maggie Smith, are on set in the city.
Gloucester city council leader Paul James said: “When it comes to film you don’t get any bigger than Harry Potter. It’s great for the city.”
A total of 174 pupils from King’s School, aged 11 to 18, are starring as extras in the multi million-pound production based on the JK Rowling-penned book.
A spokeswoman for King’s School said: “We’re obviously thrilled to be hosting the sixth film. Some of the sixth-formers were in the previous films and are now in them again, so they’ve grown up with Harry Potter.”
The film is set for release in the UK on 21 November.