Harry, Ron, Hermione, and Griphook are finally ready. Harry is relieved that Draco's wand seems to have switched allegiances, though he feels horrible about his choice to double-cross Griphook. Griphook seems aware that Harry is planning to do this and never leaves the trio alone together. On the appointed morning, Harry and Ron head outside to wait for Hermione and Griphook. Harry thinks that Dobby's grave is in the perfect spot, though he still wonders how Dumbledore sent the elf.
At this point, Dobby's grave serves as a reminder for Harry that, when he needs help, he just needs to ask for it and it will come—though there's no guarantee that help will be painless for all involved. He is, in other words, beginning to make sense of his relationship to Dumbledore and see Dobby as proof that someone is helping.
Hermione, disguised as Bellatrix, emerges from the cottage with Griphook. She transforms Ron's face so he can assume a fake identity, while Harry and Griphook will be under the Invisibility Cloak. Outside the boundary of the Fidelius Charm, Griphook climbs on Harry's back and the four of them Apparate to the Leaky Cauldron. Hermione struggles to get in character and is too nice to the barman, but they make it into Diagon Alley. Ragged people sit in doorways begging. Some disappear when they see Hermione; one man throws himself at her asking where his children are. Ron blasts him away.
The ragged people are presumably those who underwent trial with Umbridge and had their wands taken away—and their children. This shows Harry what he's fighting against. By destroying Voldemort, he'll usher in a world in which these people can have wands again and resume their places as contributing members of Wizarding society.
Travers greets Bellatrix and Harry whispers who Travers is to Hermione. Hermione allows Travers to walk with her, but this proves potentially dangerous: Travers wants to know why Bellatrix isn't still imprisoned at Malfoy Manor and why Bellatrix has her wand when they know that Harry stole it. Hermione coolly tells Travers to not listen to rumors. Harry Confunds the two wizards acting as security at Gringotts's doors. When Hermione asks the goblin Bogrod to take her to her vault, he asks for identification. Griphook hisses that they suspect this Bellatrix isn't the real one, and Harry places the goblin under the Imperius curse. He does the same for Travers. Bogrod calls for the "Clankers" and leads his clients through a door.
Remember that as an Unforgivable Curse, using the Imperius Curse could land Harry in Azkaban under normal circumstances (using an Unforgivable Curse earns a person a lifetime sentence in Azkaban). That Harry chooses to use it suggests first that desperate times call for desperate measures, and calls Harry's own relative goodness into question. While his quest to defeat Voldemort is undeniably good, the reader is forced to go through some of the same thought processes that Harry has had to deal with and decide if Harry is less of a good person because of this choice.
Harry reveals himself, explains that Bogrod and Travers are under the Imperius Curse, and says that the other goblins suspect them. They agree to go on, so Harry makes Travers hide and Bogrod calls a cart. As they zoom along, Harry thinks their plan was foolish. They pass under a waterfall, get dumped out of the cart, and Hermione returns to her normal form. Griphook explains that the water sets off alarms and washes away concealment charms. Harry replaces the Imperius Curse on Bogrod and, moments later, they reach a gigantic tethered dragon. Griphook passes out the Clankers and everyone shakes them. The dragon retreats in fear at the noise. Harry makes Bogrod put his hand on the door of the Lestranges' vault and the door disappears to reveal mounds of treasure.
The effects of the waterfall call into question whether Griphook actually told Harry everything Harry needed to know to make this work. Again, this shows Harry that he needs to be critical of the help he gets and the information he receives, even when it seems like he's on the same side as his allies—everyone has their own goals and, possibly, is working for themselves as much as they're helping Harry.
The door closes behind them and they begin to search for Hufflepuff's cup. Hermione touches a goblet and it burns her and begins to multiply. Griphook instructs them to touch nothing. Harry sees the cup and asks for the sword to try to hook it through a handle. Hermione levitates him, knocking more treasure over. Harry hooks the cup, pulls Griphook out of the burning metal, and loses the sword. Griphook grabs it, flinging the cup, and Harry knows that Griphook knew he wasn't going to keep his word. Harry catches the cup as the mound of treasure pushes him, Ron, and Hermione out of the vault. Griphook joins the approaching goblins. Harry releases the dragon, climbs on its back with Hermione and Ron, and, when the dragon realizes it's free, it starts to climb. It takes off from street level.
Despite Griphook's choice to defect and join the other goblins, it's worth noting that, technically speaking, he kept his word—and he also made sure that Harry kept his word. This makes it easier to see that Griphook was an understandably suspicious ally, but one that was fundamentally not a bad person. Later, should Harry choose to think about it in this way, this could show Harry the importance of recognizing goblins as contributing members of society and of keeping his word.