Colors in a GIF still have 24 bit depth (8 bits per RGB channel = 8 * 3 = 24), even though pixels use only 8 bits and therefore can only have one of 256 different colors. But these 256 colors are any of the 16 million available. Your GIF has 24 bit colors and an 8 bits per pixel format.
There are three concepts at play here. One is
color depth, which is how many bits are used to represent each color shade. In a vast majority of instances these days we work with 24 bit colors, 8 bit per color channel. GIF also uses 24 bit colors.
Second concept is
indexed colors. In a GIF, the colors are put into a color table, essentially the palette your GIF will use. Each color in the table has its index, so that the GIF can easily refer to it by a single number, from 0 to 255. Ergo, indexed colors.
Now, each pixel needs to be able to say which of these 256 colors it uses, so to represent a number from 0 to 255 you need 8 bits (2^8 = 256). So the GIF needs to spend 8 bits per pixel to tell which color each pixel has. This is the third concept, bits per pixel. GIF uses 8 bits per pixel.
If an image is not indexed, it will store the color directly for each pixel instead of using a separate table. It will say exactly which 24 bit shade to use for every pixel. So it will use 24 bits per pixel and represent 24 bit colors. In this case bits per pixel corresponds to color depth. But you can't say the same for indexed images, because they chose to make a tradeoff. In the GIF example, they spend only 8 bits per pixel (1/3 the size) to choose a color, but can only have max of 256 colors. And they have to separately store data for the palette, 256 colors * 24 bits, so the total space gained is a bit less than 2/3. It's more nuanced in practice because most image formats also use compression on top of that, but let's not get into that.
Hopefully not too giberish to understand.
Also, you can make something great no matter the color depth or bits per pixel used. There are plenty awesome black and white games that only use 1 bit colors/1bpp.