In The Enemy Below (at 1:21:18/1:37:35), the USN XO fires one round from his pistol into mattresses that sailors have poured gasoline on. Next these mattresses fire up. Is this scientific?
Not particularly scientific, no.
You need an ignition source to start a fire, and a regular bullet is simply a lump of metal. In theory, if the bullet hit a another surface it might spark, but Mythbusters tried very hard to ignite a vehicle's gas tank once. Even with an incendiary/tracer bullet shooting into a tank of vapour, they just couldn't get it done.
Mattresses soaked in gasoline probably wouldn't provide enough opportunity to soak and ignite.
I couldn't view the video in the original version of the question and was unaware that the officer was using a flare gun. This somewhat changes the situation, and it is much more likely that the gasoline vapour will ignite which will then ignite the gasoline-soaked mattresses
As the other answer states, a single actual standard bullet would not ignite that way.
However, in the movie, it seems clear that the officer is not using a standard handgun but rather a flare gun of some kind.
Granted that this is hard to make out in the somewhat darkened scene but the sound, shape and action do seem to bear this out.