The metric tensor is a bilinear map ##g:V\times V\to\mathbb R##. The definition requires it to satisfy a few more conditions. Those other conditions are almost the same as the ones you see in the definition of "inner product", so you could say that g is "almost" an inner product.
The bilinearity allows you to write
$$g(u,v)=g(u^i e_i, v^j e_j) = u^i v^j g(e_i,e_j) = u^i v^j g_{ij},$$ where I have defined ##g_{ij}=g(e_i,e_j)##. These numbers are called the components of g, with respect to the ordered basis ##(e_i)_{i=1}^n##.
The dual ordered basis to ##(e_i)_{i=1}^n## consists of the ##e^i\in V^*## such that ##e^i(e_j)=\delta^i_j##. Note that
$$e^i(u)=e^i(u^je_j) =u^je^i(e_j)=u^j\delta^i_j =u^i.$$ This implies that we have
$$g(u,v)=u^i v^j g_{ij} =e^i(u) e^j(v) g_{ij} = g_{ij} (e^i\otimes e^j)(u,v).$$ This implies that ##g=g_{ij}e^i\otimes e^j##.