You would have to use the following expression for your image height:
\includegraphics[height=\dimexpr
\textheight-3\baselineskip-\parskip-.2em-
\abovecaptionskip-\belowcaptionskip\relax]{image}
which removes from \textheight 3 lines of text = 3\baselineskip, a paragraph skip = \parskip, "roughly" the depth of the last line = .2em*, as well as the skip above and below the caption = \abovecaptionskip and \belowcaptionskip.
This may differ from one document class to the next. For example, this is how article (and the other standard document classes) define \@makecaption (executed by \caption to typeset the actual caption):
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{#1: #2}%
\ifdim \wd\@tempboxa >\hsize
#1: #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
Note the (vertical) skips like \abovecaptionskip, \belowcaptionskip and \par.
For completeness, here's a minimal example, with the image exchanged for a rectangular box (or \rule):
\documentclass{article}
\begin{document}
\begin{figure}
\rule{\textwidth}{\dimexpr\textheight-3\baselineskip-\parskip-.2em-
\abovecaptionskip-\belowcaptionskip}
\caption{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus
elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.}
\end{figure}
\end{document}
* The actual depth of the last paragraph depends on the caption contents. However, at 10pt font, the depth is just under 2pt, while 1em is about 10pt, making .2em roughly similar.