As other answers have noted, the quote about controlling the past appears in various places in the novel: in part 1, chapters 2 and 3; in part 3, chapter 2; and in Emmanuel Goldstein's The Theory and Practice of Oligarchic Collectivism. The quote is as follows:
Who controls the past controls the future. Who controls the present controls the past.
The number of repetitions of this slogan show its importance to the state. It is also important to Winston, who at about thirty-nine years old, is one of the few Party members with memories of the time before the Party took over. His job, too, involves endlessly revising the past to suit the needs of the present moment.
Winston knows from his childhood memories that the Party lies about the past to inflate its own importance. For example, he remembers airplanes:
Sometimes, indeed, you could put your finger on a definite lie. It was not true, for example, as was claimed in the Party history books, that the Party had invented aeroplanes. He remembered aeroplanes since his earliest childhood.
To Orwell, being able to remember a concrete reality anchors a person in a verifiable reality in which the present can be accurately evaluated against the past. In Oceania, however, that anchor has been torn away. Therefore, people are what we would call today perpetually "gaslighted": they are constantly told their memories, a chief basis of selfhood, security, and identity, are wrong. For instance, as Winston knows, the Party will say it has increased chocolate rations when in reality it has cut them. This allows it to assert life is constantly getting better when in fact, it is constantly getting worse.
Controlling one's own memories, especially through being able to retrieve memories and rely on memories, is essential to keeping one's humanity, Orwell argues, a humanity that is under constant assault from the Party.