Whitehead for maps I made the following claim over at the Secret Blogging Seminar, and now I'm not sure it's true:
Let $f: X \to Y$ and $g: X \to Y$ be two maps between finite CW complexes. If f and g induce the same map on $\pi_k$, for all k, then f and g are homotopic.
Was I telling the truth?
EDIT: Since I didn't say anything about basepoints, I probably should have said that f and g induce the same map 
$[S^k, X] \to [S^k, Y]$.
This will also deal better with the situation where X and Y are disconnected. I'd be interested in knowing a result like this either with pointed maps or nonpointed maps. (Although, of course, if you work with pointed maps you have to take X and Y connected, because $[S^k, -]$ can't see anything beyond the number of components in that case.)
 A: For finite spectra, your question is precisely Freyd's generating hypothesis, which is open.
A: Another class of examples comes from group cohomology: if $G$ is any group with interesting higher cohomology $H^n(G, A), n \ge 2$ then there are non-nullhomotopic maps $BG \to B^n A$ for some $n \ge 2$. But the source and target don't have nonzero homotopy groups in any shared degree so any such map induces the zero map on homotopy groups. If these cohomology groups all vanished then, among other things, groups would have no nontrivial central extensions and so all finite $p$-groups would be elementary abelian! 
(Edit: admittedly, the above examples don't usually involve finite complexes. But with the right $G$ we can take $BG$ to be an aspherical manifold and then we can truncate $B^n A$.) 
This is the precise analog, in topology, of the fact in homological algebra that in most interesting abelian categories $\text{Ext}^i$ can be nontrivial for $i \ge 1$, which reflects the existence of maps in derived categories between two objects which don't have nonzero homology groups in any shared degree. 
Group cohomology turns out to be a pretty good model for the more general question: 

What is a complete set of obstructions for a map $f : X \to Y$ (let's say pointed, between pointed CW complexes) to be nullhomotopic? 

There is an obstruction theory coming from trying to lift $f$ up through the stages of the Whitehead tower
$$\dots \to Y_2 \to Y_1 \to Y_0 \cong Y$$
of $Y$. Here $Y_k$ is the $(k-1)$-connected cover of $Y$, obtained from $Y$ by killing $\pi_1, \pi_2, \dots \pi_{k-1}$ (so the index tells you the lowest degree in which it can have a nontrivial homotopy group). In particular $Y_1$ is the connected component of the basepoint and $Y_2$ is the universal cover. 
At each stage, suppose we've lifted $f$ to a map $f_n : X \to Y_n$. Now, $Y_n$ has lowest homotopy group $\pi_n(Y_n) \cong \pi_n(Y)$, and hence there is a natural map
$$k_n : Y_n \to B^n \pi_n(Y)$$
inducing an isomorphism on $\pi_n$. The pullback of this map along $f_n$ gives a cohomology class 
$$k_n \in H^n(X, \pi_n(Y))$$
which I'll also call $k_n$, and $f_n$ lifts to a map $f_{n+1} : X \to Y_{n+1}$ iff this cohomology class vanishes. (In general, $k_n$ is only well-defined once we've chosen a lift $f_n$.) The punchline now is that $f$ is nullhomotopic iff all lifts $f_n$ exist iff all classes $k_n$ vanish. If $X$ has finite cohomological dimension then this is in principle only finitely many conditions to check. 
Example. Let $Y = BO$ be the classifying space of stable real vector bundles, let $X$ be a smooth manifold, and let $f : X \to BO$ be the classifying map of the stable tangent bundle. Then $f$ is nullhomotopic iff $X$ is stably parallelizable. The characteristic classes $k_n$ are Bott periodic. Here are the first few:
$k_1$ is the first Stiefel-Whitney class $w_1$. It vanishes iff $f$ lifts to a map $f_2 : X \to BSO$ iff $X$ is orientable. Here $BSO$ is $Y_2$.
$k_2$ is the second Stiefel-Whitney class $w_2$. It vanishes iff $f_2$ lifts to a map $f_3 : X \to BSpin$ iff $X$ has a spin structure. Here $BSpin$ is $Y_3 \cong Y_4$.
$k_3$ automatically vanishes. $k_4$ is the first fractional Pontryagin class $\frac{p_1}{2}$. It vanishes iff $f_3$ lifts to a map $f_5 : X \to BString$ iff $X$ has a string structure. Here $BString$ is $Y_5 \cong Y_6 \cong Y_7$. 
A: A simple example with finite complexes would be the collapse map $q:X\times Y\to X \wedge Y$.  Since the inclusion $X \vee Y \hookrightarrow X\times Y$ is surjective on $\pi_*$,
$q_* = 0$.  But $q$ is generally nonzero on homology; for example if $X = S^n$, $Y=S^m$, 
then $q_*$ is an isomorphism on $H_{n+m}$.
A: This is not true.  Consider, for example, a degree 1 map from a torus $S^1 \times S^1$ to $S^2$ (concretely, realize the torus as a square with identifications, and then collapse the boundary of the square to a point).  This map is trivial on all homotopy groups (since for any $n>0, \pi_n$ is 0 for either the domain or the codomain), but it is not homotopically trivial because it is nonzero on $H_2$.
If you want to demand that the spaces be simply connected, you can get a counterexample by considering cohomology operations: the cup square, for example, gives a map from $K(\mathbb{Z},n)$ to $K(\mathbb{Z},2n)$ which is nontrivial, but for the same reason as the previous example it must be 0 on homotopy groups.  This example is not finite-dimensional, but it's probably possible to find one that is--I just don't know how because I don't know how to show a map is trivial on homotopy groups if the spaces have infinitely many nontrivial homotopy groups whose values are unknown, which is the case for most finite-dimensional examples.
A: Another interesting counterexample is given by so-called "phantom maps", which induce the zero map on all homotopy groups but are not nullhomotopic.  Given an infinite CW-complex X which is a union $\bigcup X_n$ of finite subcomplexes, Milnor described homotopy classes of maps out to Y where the phantom maps are given by a "lim$^1$"-term.
For example, I believe that using this Brayton Gray used this to construct a map from $CP^\infty$ to $S^3$ that is nullhomotopic on $CP^n$ for all $n$.
A: Sorry to revive an old question, but I can't resist emphasizing the big picture. The question is whether the homotopy groups, considered as functors $\pi_n: \mathrm{HoTop_{*,fin}} \to \mathrm{Set}$, are jointly faithful. This is equivalent to asking whether the product of these functors $\prod_n \pi_n: \mathrm{HoTop_{*,fin}} \to \mathrm{Set}$ is faithful. Not only is this functor not faithful, but Freyd showed that no functor from $\mathrm{HoTop}_{*,fin}$ to $\mathrm{Set}$ can be faithful!  The same goes for functors $\mathrm{HoTop}_{fin} \to \mathrm{Set}$, and of course this means there is no faithful functor $\mathrm{HoTop} \to \mathrm{Set}$ or $\mathrm{HoTop}_* \to \mathrm{Set}$.
A category admitting a faithful functor to $\mathrm{Set}$ (such as groups, or rings, or chain complexes, or topological spaces at the point-set level, or pretty much any category you know which is not the derived category of something) is called concrete; Freyd's result says that the homotopy category is not concrete. Note that a non-concrete functor can't have a faithful functor to any concrete category! Akhil Mathew has a nice blog post going through the proof of Freyd's result. It comes down to the fact that in the homotopy category you can have a proper class of (suitably generalized) quotient objects, which can't happen in a concrete category.
In this context, Freyd's generating hypothesis (as alluded to in Josh Shadlen's answer), implying that the stable homotopy category (of finite spectra) is concrete, is absolutely astounding.(see Eric Wofsey's comment below straightening me out on this)
EDIT As pointed out in the comments, the question was actually about finite homotopy types, which form a small category (hence concrete by taking the coproduct of all representables). And Freyd's results really have nothing to say about the faithfulness of the homotopy groups on finite homotopy types. Freyd does show that the homotopy category of finite-dimensional CW complexes is not concrete. So what I said above is only accurate if by $\mathrm{HoTop}_{*,\mathrm{fin}}$ I mean the homotopy category of finite-dimensional CW complexes rather than finite ones.
EDIT2 Here's a relation between Freyd's ideas and the non-faithfulness of the homotopy groups on finite CW complexes. Freyd formulates an equivalence relation on morphisms out of an object in a pointed category which generalizes the notion of two morphisms having the same image (namely, $A\to B \sim A \to C$ if for every $X \to A$ one has $X \to B = 0$ iff $X \to C= 0$). This equivalence relation is reflected by any faithful functor $F$, i.e. if $Ff$ and $Fg$ have the same generalized image then $f$ and $g$ have the same generalized image. The map $S^1\times S^1 \to S^2$ crushing the 1-skeleton to a point does not have the same generalized image as a point, but after applying $pi_*$ it does.
An equivalence class of maps with the same generalized image can be regarded as a "generalized quotient". Freyd's idea was that in the homotopy category, an object can have a proper class of generalized quotients, which is impossible in a concrete category. For finite CW complexes, we don't have a proper class of generalized quotients, but we can exhibit a nonzero generalized quotient which is sent to zero by the homotopy groups.
A: I think the proper Whitehead for maps says that if the cone of the map has trivial homotopy groups, then the map is a homotopy equivalence.
Edit: see also the discussion of Whitehead theorem in the comments.
