In answer to the question, the scientific advisor to Interstellar, <PERSON>, considered the effects of tidal forces on Miller's planet in quite some detail, and in fact the mass of Gargantua was set by the requirement of having the planet not be ripped to shreds.
(Note: I gave a lot of this material in comments to <PERSON>'s answer, but given the ephemeral nature of comments I think it is better to give it in an answer of its own).
The first requirement is that the orbital radius of Miller's planet is just a little larger than Gargantua's horizon, $R = G M/c^2$, where $M$ is the mass of Gargantua. Following the Technical Notes in The Science of Interstellar, the tidal force on <PERSON>'s world is given by:
$g_{\mathrm{tidal}} = \frac{2 G M}{R^3} r$,
where $r$ is the radius of <PERSON>'s planet. The gravitational acceleration on <PERSON>'s planet is given by:
$g = \frac{G m}{r^2}$,
where $m$ is the mass of <PERSON>'s planet. For the planet not to be torn apart, $g_{\mathrm{tidal}} < g$, and from combining these two expressions we can deduce that the limiting density of <PERSON>'s planet is $\rho = \frac{3}{2 \pi} \frac{M}{R^3}$. Note that this assumes that the planet is a spherical rigid body; a more sophisticated argument used in <PERSON>'s answer assumes that the planet is a deformable fluid ellipsoid gives a similar result, but with a larger prefactor.
The value for $\rho$ thus sets the value of $M / R^3$, and combining this with the horizon equation gives a unique solution for the mass and radius of Gargantua. 24
Using a value of $\rho = 10,000$ kg/m$^3$ gives $M = 3.5 x 10^{38}$ kg and $R=2.5x 10^{11}$ m. These values were then rounded off to $2 x 10^{38}$ kg (about 100 million suns), and an orbital radius of $1.48 x 10^8$ km.
This value of $\rho$ is pretty high. Most rocks have densities of about 2,000 - 3000 kg/m$^3$. A more reasonable value would be obtained by increasing the value of $M$ since $\rho \propto 1 / M^2$. However, as Thorne explained in The Science of Interstellar:
I want to keep the numbers simple and there's a lot of slop in this one, so I chose [Gargantua's mass to be] 100 million [solar masses]. 24