蛋糕 covers all types of cake. 生日蛋糕 (shēngrì dàngāo) = birthday cake. For small cupcake-style cakes, you might hear 小蛋糕 or 杯子蛋糕 (cupcake). A piece/slice of cake is 一块蛋糕 (yī kuài dàngāo).
usage
小蛋糕 is also used as internet slang as a cute term of endearment, similar to 'sweetie.'