Q:

Why does Gandalf take Pippin with him to Minas Tirith?

In The Return of The King, why does Gandalf take Pippin with him when he goes to Minas Tirith?
Or, in a more exact way, why does Sauron think Pippin has the One Ring?

A:

You partially answer your first question with your second. Sauron, probably through Saruman, guesses a hobbit has his Ring. And as Pippin is the only hobbit he sees through the Palantir, he probably thinks he is the ring bearer. 
Gandalf also wanted to protect Pippin from himself by separating him from the Palantir. Going cold turkey.

