Who invented the gamma function? Who was the first person who solved the problem of extending the factorial to non-integer arguments? 
Detlef Gronau writes [1]: "As a matter of fact, it was Daniel Bernoulli who gave in 1729 the first representation of an interpolating function of the factorials in form of an infinite product, later known as gamma function."
On the other hand many other places say it was Leonhard Euler. Will the real inventor please stand up? 
[1] "Why is the gamma function so as it is?" by Detlef Gronau, Teaching Mathematics and Computer Science, 1/1 (2003), 43-53.
 A: In his first letter to Goldbach (already linked to in Jonas' answer) Euler writes that he communicated his interpolation of the sequence of factorials (or Wallis's hypergeometric series, as it was called back then) to Daniel Bernoulli:
"I communicated this to Mr. Bernoulli, who by his own method arrived at nearly the same final expression" (this is the sentence starting with "communicavi haec . . . " on p. 4). 
A: According to the Wikipedia article the question was of extending the factorial beyond the integers was first posed in the 1720's by Daniel Bernoulli and Christian Goldbach. It was first solved by Euler in 1729. Here (Wayback Machine) is an English translation of a paper by Euler which contains his solution.
A: I don't have a complete answer.  As you say, many sources say that Euler did it, but Gronau gives compelling reason to doubt this.  The best source I have found for this issue is "The early history of the factorial function" by Dutka, and for what it's worth I am convinced that Gronau's assessment is a fair one.
First, I'll summarize the usual story.  Kline discusses this in chapter 19, section 5 of Mathematical Thought from Ancient to Modern Times (which falls in volume 2 of the paperback printing), and a more thorough source is Davis's article "Leonhard Euler's Integral: A Historical Profile of the Gamma Function".  There is agreement in these sources that Euler solved the problem after unsuccessful attempts by Stirling, D. Bernoulli, and Goldbach, and that the first record of Euler's solution appears in outline form in a 1729 letter from Euler to Goldbach.  This was expanded in subsequent letters and written up in the article to which Kristal Cantwell links (apparently the article was written in 1729 but not published until 1738).  Euler's letters to Goldbach start on the third page of this pdf.
However, Gronau cites a letter by Bernoulli that was written a few days before Euler's and that contains at least a partial solution, possibly contradicting Kline and Davis.  Dutka's paper goes into more detail and also claims that Euler's work was influenced by Bernoulli's earlier solution.  I could only speculate on what led to the confusion among other authors, and I won't do so here.  Perhaps it should be mentioned here (as is done by Gronau and Dutka) that Euler did much more than Bernoulli.  For instance, Euler gave the first integral representations of the gamma function.
Edit: Because this answer is accepted and yet incomplete, I want to direct attention to Bruce Arnold's answer below.  It contains a link to a copy of the too often neglected letter of D. Bernoulli cited by Gronau and Dutka.
A: The first person who gave a representation of the so called gamma function was Daniel Bernoulli in a letter to Goldbach from 1729-10-06. The letter can be seen here.
The formula reads in modern notation as given by Gronau in the article cited in the answer:
$   x! = \lim_{n\rightarrow \infty}\left(n+1+\frac{x}{2}\right)^{x-1} \prod_{i=1}^n\frac{i+1}{i+x} $
Gronau also observes that "Numerical experiments show that the formula of Bernoulli converges much faster to its limit than that of Euler ...", "that of Euler" refers here to a formula Euler has given in a letter to Goldbach dated 1729-10-13.
Gronau writes: "Euler who, at that time, stayed together with D. Bernoulli in St. Petersburg gave a similar representation of this interpolating function. But then, Euler did much more. He gave further representations by integrals, and formulated interesting theorems on the properties of this function."
Though this justifies the name 'Euler gamma function' Euler's representation was historically only second to Daniel Bernoulli's.
The correspondence between Goldbach, Daniel Bernoulli and Euler which undoubtedly gave birth to the gamma function is well documented in Paul Heinrich Fuss's „Correspondance mathématique et physique de quelques célèbres géomètres du XVIIIeme siècle ..“, St. Pétersbourg, 1843.
