You need an infinite dimensional Hilbert space to represent a wavefunction of any continuous observable (like position for example).
Wavefunctions map real numbers, which correspond to classical observables like spin or position, to complex coefficients of some set of basis kets in a Hilbert space. That basis and those coefficients define a ket that can be identified with the wavefunction, is called the "quantum state" of the system, and can be used in calculations.
How is each real number mapped to a complex coefficient? Each basis ket is an eigenvector of some observable. The real number is the corresponding eigenvalue.
It follows from this that a basis in a finite dimensional Hilbert space can only be used to define a ket corresponding to a wavefunction that is defined only for specific eigenvalues, which you might call a "discrete" wavefunction.
For example, you could use a 2-dimensional basis for a system describing the spin of one particle, with two basis kets, |up> and |down>. The wavefunction, psi(), would only be defined for two values, +1 and -1, which are the eigenvalues corresponding to |up> and |down>. psi(+1) * psi*(+1) would give you the probability that the particle was in the "up" state, and psi(-1) * psi*(-1) the probability that it was in the "down" state.
If |psi> is the ket identified with the wavefunction psi(), then <up|psi> gives you the same result, and has the same interpretation, as psi(+1) and <down|psi> corresponds to psi(-1) in the same way.
psi(3) or psi(0.6) don't make any sense here because there are no such observables-- there are only two observable states in this system, and hence an eigenbasis in a 2-dimensional Hilbert space with two eigenvalues can be used to represent it.
But an observable like position is continuous-- we can ask what's the probability that the position is 0.6, or 0.601, etc. So we need a wavefunction defined for every real number, each of which must be the eigenvalue of an eigenvector in a basis in a Hilbert space. Since there are infinite possible values of position, we need infinitely many eigenvectors, and an infinite-dimensional Hilbert space.
This is all explained in this excellent book by Leonard Susskind.