I think its a mix to be honest, you should have some basic core gameplay to start with, then you can write most of the story but no need to go too much into detail yet. then as you go you will add more detail to the gameplay, but do so with the narrative/story in mind so that it can enhance it.
A good but example of this would be Metro 2033 (but also a bad example since it is based on a book

)
They likely had the idea that it would be a first person with guns in it pretty early, but then they fleshed it out by making you have to pump your flashlight to keep it lighting strong, or search for ammonition, or a more story oriented example would be the part were you had to stare at the ghost, or the librarians.
You start with simple gameplay to get an approach, then you add the main story on it and expand from there, that my opinion.