I would first use rational numbers such as 1/2 instead of floating point numbers such as 0.5. Then you can use Series:
Series
Series[g[t], {t, 0, 5}]