I was asked to post my hint as an answer. I'm going to elaborate a little, though.
The first thing to observe is that the inner product only depends on its values on a basis. Let me restrict to complex vector spaces (for me an inner product is linear in the first variable and anti-linear in the second one). So let $\langle\cdot,\cdot\rangle$ be an inner product on $\mathbb{C}^n$ and let $(v_1,\ldots,v_n)$ be a basis. Now if $x = x_{1} v_{1} + \cdots + x_{n}v_{n}$ and $y = y_{1} v_{1} + \cdots + y_{n} v_{n}$ are two arbitrary vectors, we get by using sesquilinearity that $\langle x,y \rangle = \sum_{i,j = 1}^{n} \langle v_{i}, v_{j}\rangle\, x_{i} \, \bar{y}_{j}.$ This shows that the values $a_{ij} = \langle v_{i},v_{j} \rangle$, $i,j = 1,\ldots,n$ determine the inner product entirely.
Let us consider the $n \times n$ matrix $A = (a_{ij})_{i,j =1}^{n}$ a bit more closely. First of all, notice that $a_{ij} = \langle v_{i},v_{j} \rangle = \overline{\langle v_{j},v_{i} \rangle} = \overline{a_{ji}}$ by the symmetry of the inner product. Writing this in matrix form, this is equivalent to $A^{\ast} = A$, where $A^{\ast}$ is the conjugate-transpose of $A$. In general, a matrix $A$ satisfying $A^{\ast} = A$ is called Hermitian. The second observation is that we can write the inner product as $\langle x, y \rangle = (A \cdot y)^{\ast} \cdot x,$ where $\cdot$ denotes the matrix product. Now the positive definiteness condition $\langle x, x \rangle \gt 0$ for all $x \neq 0$ can't be expressed as a simple condition on $A$ (but for instance, the combination of diagonal dominance and "Hermitian-ness" is sufficient - off-topic: is the ugly concoction "Hermitian-ness" used in the present case or even "Hermitianity"?! - be that as it may, the link on positive definiteness contains a number of good conditions).
The point I'm heading at is the following exercise you may or may not want to do (I've done one half of it in the above and left you the easier part):
Exercise: If $A = (a_{ij})_{i,j = 1}^{n}$ is an $n \times n$ Hermitian positive definite matrix, then the expression $ \langle x, y \rangle_{A} := (A \cdot y)^{\ast} \cdot x = \sum_{i,j = 1}^{n} a_{ij}\,x_{i}\,\overline{y_{j}}$ defines an inner product on $\mathbb{C}^{n}$ and conversely, given an inner product, we get a Hermitian positive definite matrix $A$ by the procedure described above.
Finally, I'm addressing your actual question, so let $(v_{1},\ldots,v_{n})$ be a basis of $\mathbb{C}^{n}$. The condition that this basis should be orthonormal with respect to a stipulated inner product $\langle \cdot, \cdot\rangle$ states that the matrix $A = (a_{ij})_{i,j=1}^{n} = (\langle v_{i},v_{j} \rangle)_{i,j=1}^{n}$ must be the $n \times n$-identity matrix $I_{n}$ (why?). Now it is rather straightforward to check that the expression
$\langle x, y \rangle_{I_{n}} = \sum_{i = 1}^{n} x_{i} \overline{y_{i}}$
actually is an inner product on $\mathbb{C}^{n}$ for which $v_{1},\dots,v_{n}$ is an orthonormal basis (note that I'm expressing $x,y$ in terms of the basis $(v_{1},\ldots,v_{n})$!).
The case of $\mathbb{R}^{n}$ is very similar, simply omit all the complex conjugates, replace conjugate-transpose by ordinary transpose and Hermitian by symmetric.