It's normal gerbil behavior!
I have had several pairs of gerbils over the years and they would do that as a warning signal of danger to the other gerbil.
Was there an unfamiliar or sudden loud noise that might have scared Sam?
Sometimes they would do it if you went up to their cage when they weren't expecting you. I always thought it was cute.
So don't worry, it is normal and you don't need to go to the vet.