To think is to gather oneself before what calls. This gathering is not the concentration of a calculating mind that has assembled all relevant information; it is closer to what happens when one truly listens — when the listener becomes, for a moment, entirely available to what is being said, cleared of preconceptions and agendas. This kind of gathered availability is memory in Heidegger's sense: not a store of information but a mode of being that remains with what has been given rather than rushing past it toward the next item.
There is something given in every genuine thought — something encountered rather than produced, something that surprises even the thinker. Heidegger's word for this givenness is a gift (Gabe) that calls forth gratitude (Dank). The thinker who is truly thinking does not feel themselves to be the author of their thoughts; they feel themselves to be the site through which something has been granted. This is why memory and thanks are the appropriate response to genuine thinking: they acknowledge the priority of the given over the constructed, the encountered over the manufactured.
The meditation on the connection between Gedanke, Gedächtnis, and Dank occupies Part One, Lecture 2 of What Is Called Thinking? Heidegger's practice of tracing philosophical significance through etymological and lexical connections — his so-called "destructions" of key philosophical terms — is one of the most distinctive and contested features of his method.