In this context $C^*(a)$ is defined to be the (not-necessarily-unital) C*-algebra generated by $a$. If $a$ is invertible, then $C^*(a)=C^*(1,a)$, $\sigma(a)=\sigma(a)\setminus\{0\}$, and $C_0(\sigma(a))=C(\sigma(a))$.
If $a$ is not invertible, then $0\in\sigma(a)$, and $C_0(\sigma(a)\setminus\{0\})$ can be identified with the ideal $M_0=\{f\in C(\sigma(a)): f(0)=0\}\subset C(\sigma(a))$. If $\Gamma:C^*(1,a)\to C(\sigma(a))$ is the Gelfand isomorphism, then $\Gamma(a)\in M_0$, from which it follows that $\Gamma(C^*(a))\subseteq M_0$. Since $\Gamma$ is an isomorphism and both $C^*(a)$ and $M_0$ are maximal ideals in the respective algebras $C^*(1,a)$ and $C(\sigma(a))$, this implies that $\Gamma(C^*(a))=M_0\cong C_0(\sigma(a)\setminus\{0\})$.
Note that $t\mapsto 1/t$ is not always an element of $C_0(\sigma(a)\setminus\{0\})$. It is if $a$ is invertible, or if $0$ is an isolated point in $\sigma(a)$. The latter is the tricky part, because in that case $C^*(a)$ is actually a unital $C^*$-algebra, but its unit is not the unit of $A$. Since $\sigma(a)\setminus \{0\}$ is compact in that case, you would have $C_0(\sigma(a)\setminus\{0\})=C(\sigma(a)\setminus\{0\})$, and the constant function $1$ would be in the space as the unit. Hence $\Gamma^{-1}(1)\in C^*(a)$ is a unit for $C^*(a)$ distinct from $1\in A$.
To hopefully clear up this confusion you can go back to $M_0$, where there is no function $t\mapsto 1/t$, but rather the function that sends $t$ to $1/t$ if $t\neq 0$, and sends $0$ to $0$. This is not the inverse of $\Gamma(a)$ in $C(\sigma(a))$, hence the inverse Gelfand map does not send it to $a^{-1}$ (which doesn't exist) in $C^*(1,a)$.
In general, if $p=p^*=p^2$, then $pAp$ is a C*-subalgebra of $A$ with unit $p$, but unless $p$ is the unit of $A$, it is not a unital subalgebra in the usual sense. In the case where $a$ is not invertible and $0$ is isolated in its spectrum, and the function $f:\sigma(a)\to\mathbb C$ is defined by $f(0)=0$, $f(t)=1$ if $t\neq 0$, then $p=\Gamma^{-1}(f)$ is a unit for $C^*(a)$, but $p$ is not the unit of $A$.