In Return of the King, after Pippin looks into the Palantir, he tells Gandalf that he saw a white tree, and Gandalf says what he saw was Minas Tirith. He then apparently takes Pippin on a horse to Minas Tirith. But when he takes Pippin to the white tree, he says it's the tree of Gondor. Also, the person in the castle, the father or Boromir, was the Steward of Gondor (we know this from the previous Lord of the Rings movies). So is Gondor the kingdom and Minas Tirith the castle? What is the difference between them?
As you can see from this map of Middle Earth, Gondor is the name of the kingdom to the west of Mordor:
And Minas Tirith is a castle city, and capital of the kingdom during the time period depicted in the series:
As it says on the Wikipedia article for The White Tree of Gondor, it stands as a symbol for the realm of Gondor, but it also a symbol of the leadership of Gondor: the tree had died hundreds of years ago and it would not be replaced until the King returns (as the current leadership during the series is Denethor, The Steward of Gondor).
There isn't really a difference between Gondor and Minas Tirith, besides the fact that Gondor is the country and Minas Tirith is the replacement capital of the country. A country can't be a capital. And a capital can't be a country. So obviously they are two very different things! There can -- as you know -- be a capital to a country, and that is exactly what Minas Tirith is for Gondor.