Did the Buddha know God? I recall reading or hearing, I don't know how long ago, that the Buddha knew the God that many religions believe is the creator. The story is that this powerful, long lived God was around when the universe came into existence and believed he was responsible for the creation. But I've not been able to recall or find the the source. Is there such a story in any of the Buddhist writings or commentaries?
The God you speak of, is known as the Great Brahma or Mahabrahma, the first being to appear in the Mahabrahma plane, when the world expands again. Also, take a look at the 31 planes of existence.

The story you're looking for is in DN1:


  "There comes a time, bhikkhus, when after the lapse of a long period this world contracts (disintegrates). While the world is
  contracting, beings for the most part are reborn in the Ābhassara
  Brahma-world. There they dwell, mind-made, feeding on rapture,
  self-luminous, moving through the air, abiding in glory. And they
  continue thus for a long, long period of time.
  
  "But sooner or later, bhikkhus, after the lapse of a long period, there comes a time when this world begins to expand once again. While
  the world is expanding, an empty palace of Brahmā appears. Then a
  certain being, due to the exhaustion of his life-span or the
  exhaustion of his merit, passes away from the Ābhassara plane and
  re-arises in the empty palace of Brahmā. There he dwells, mind made,
  feeding on rapture, self-luminous, moving through the air, abiding in
  glory. And he continues thus for a long, long period of time.
  
  "Then, as a result of dwelling there all alone for so long a time, there arises in him dissatisfaction and agitation, (and he yearns):
  'Oh, that other beings might come to this place!' Just at that moment,
  due to the exhaustion of their life-span or the exhaustion of their
  merit, certain other beings pass away from the Ābhassara plane and
  re-arise in the palace of Brahmā, in companionship with him. There
  they dwell, mind-made, feeding on rapture, self-luminous, moving
  through the air, abiding in glory. And they continue thus for a long,
  long period of time.
  
  "Thereupon the being who re-arose there first thinks to himself: 'I am Brahmā, the Great Brahmā, the Vanquisher, the Unvanquished, the
  Universal Seer, the Wielder of Power, the Lord, the Maker and Creator,
  the Supreme Being, the Ordainer, the Almighty, the Father of all that
  are and are to be. And these beings have been created by me. What is
  the reason? Because first I made the wish: "Oh, that other beings
  might come to this place!" And after I made this resolution, now these
  beings have come.'
  
  "And the beings who re-arose there after him also think: 'This must be
  Brahmā, the Great Brahmā, the Vanquisher, the Unvanquished, the
  Universal Seer, the Wielder of Power, the Lord, the Maker and Creator,
  the Supreme Being, the Ordainer, the Almighty, the Father of all that
  are and are to be. And we have been created by him. What is the
  reason? Because we see that he was here first, and we appeared here
  after him.'
  
  "Herein, bhikkhus, the being who re-arose there first possesses longer life, greater beauty, and greater authority than the beings who
  re-arose there after him.
  
  "Now, bhikkhus, this comes to pass, that a certain being, after passing away from that plane, takes rebirth in this world. Having come
  to this world, he goes forth from home to homelessness. When he has
  gone forth, by means of ardor, endeavor, application, diligence, and
  right reflection, he attains to such a degree of mental concentration
  that with his mind thus concentrated he recollects his immediately
  preceding life, but none previous to that. He speaks thus: 'We were
  created by him, by Brahmā, the Great Brahmā, the Vanquisher, the
  Unvanquished, the Universal Seer, the Wielder of Power, the Lord, the
  Maker and Creator, the Supreme Being, the Ordainer, the Almighty, the
  Father of all that are and are to be. He is permanent, stable,
  eternal, not subject to change, and he will remain the same just like
  eternity itself. But we, who have been created by him and have come to
  this world, are impermanent, unstable, short-lived, doomed to perish.'


Footnote on Ābhassara Brahma-world (by Bhikkhu Bodhi):


  The "world of streaming radiance," the sixth of the fifteen planes in
  the fine-material world (rūpaloka), the lowest order to be exempt from
  the onset of world destruction. The Brahma-world mentioned later is
  destroyed by the conflagration but reappears at an early stage.


The same being is also referenced in DN11:


  "When this was said, the gods of the retinue of Brahma said to the
  monk, 'We also don't know where the four great elements... cease
  without remainder. But there is Brahma, the Great Brahma, the
  Conqueror, the Unconquered, the All-Seeing, All-Powerful, the
  Sovereign Lord, the Maker, Creator, Chief, Appointer and Ruler, Father
  of All That Have Been and Shall Be. He is higher and more sublime than
  we. He should know where the four great elements... cease without
  remainder.'
  
  "'But where, friends, is the Great Brahma now?'
  
  "'Monk, we also don't know where Brahma is or in what way Brahma is.
  But when signs appear, light shines forth, and a radiance appears,
  Brahma will appear. For these are the portents of Brahma's appearance:
  light shines forth and a radiance appears.'
  
  "Then it was not long before Brahma appeared.
  
  "So the monk approached the Great Brahma and, on arrival, said,
  'Friend, where do these four great elements — the earth property, the
  liquid property, the fire property, and the wind property — cease
  without remainder?'
  
  "When this was said, the Great Brahma said to the monk, 'I, monk, am
  Brahma, the Great Brahma, the Conqueror, the Unconquered, the
  All-Seeing, All-Powerful, the Sovereign Lord, the Maker, Creator,
  Chief, Appointer and Ruler, Father of All That Have Been and Shall
  Be.'
  
  A second time, the monk said to the Great Brahma, 'Friend, I didn't
  ask you if you were Brahma, the Great Brahma, the Conqueror, the
  Unconquered, the All-Seeing, All-Powerful, the Sovereign Lord, the
  Maker, Creator, Chief, Appointer and Ruler, Father of All That Have
  Been and Shall Be. I asked you where these four great elements — the
  earth property, the liquid property, the fire property, and the wind
  property — cease without remainder.'
  
  "A second time, the Great Brahma said to the monk, 'I, monk, am
  Brahma, the Great Brahma, the Conqueror, the Unconquered, the
  All-Seeing, All-Powerful, the Sovereign Lord, the Maker, Creator,
  Chief, Appointer and Ruler, Father of All That Have Been and Shall
  Be.'
  
  "A third time, the monk said to the Great Brahma, 'Friend, I didn't
  ask you if you were Brahma, the Great Brahma, the Conqueror, the
  Unconquered, the All-Seeing, All-Powerful, the Sovereign Lord, the
  Maker, Creator, Chief, Appointer and Ruler, Father of All That Have
  Been and Shall Be. I asked you where these four great elements — the
  earth property, the liquid property, the fire property, and the wind
  property — cease without remainder.'
  
  "Then the Great Brahma, taking the monk by the arm and leading him off
  to one side, said to him, 'These gods of the retinue of Brahma
  believe, "There is nothing that the Great Brahma does not know. There
  is nothing that the Great Brahma does not see. There is nothing of
  which the Great Brahma is unaware. There is nothing that the Great
  Brahma has not realized." That is why I did not say in their presence
  that I, too, don't know where the four great elements... cease without
  remainder. So you have acted wrongly, acted incorrectly, in bypassing
  the Blessed One (the Buddha) in search of an answer to this question elsewhere. Go
  right back to the Blessed One and, on arrival, ask him this question.
  However he answers it, you should take it to heart.'