It is unnecessary to turn off your phone while at a gas station, but gas stations do caution and warn you not to use your cell phone while pumping gas. It is dangerous and static electricity can cause a spark and a fire can occur. While it is highly unlikely it is still a risk.
I was talking on mine a few years back, and an old man came up to me and asked me to get off the phone. He said he wanted to pump his gas without being blown up!! I had not heard of that before, so he told me the story.