In The Last Jedi, the Resistance fleet is low on fuel with the First Order following them. Can starships really "run out of gas," or was this just a contrivance by director Rian Johnson? Actually, this idea is supported by official Star Wars canon. Hypermatter fuel is created when the core of a planet is exposed to solar radiation. A hyperdrive annihilates hypermatter particles, using the energy to propel the ship into hyperspace. Hyperdrive engines are rated by class according to their speed and efficiency.
Just like nuclear reactors, hyperdrives need to be refueled. In The Phantom Menace, the hyperdrive generator in Padme's ship is damaged, and they're forced to land on Tatooine for repairs and to refuel. A typical starfighter's hyperdrive might use several thousand kilograms of hypermatter per second. The Venator-class Star Destroyers used during the Clone Wars annihilated 40,000 tons of hypermatter per second, and the Resistance flagship Raddus from The Last Jedi was three times that size.
The movie did make one confusing mistake: it's implied that another hyperspace jump would drop their fuel reserves even lower than running at sublight speeds. Actually, starships have separate sublight engines that use different fuel—although they do need refueling, too. Apparently, the Resistance fleet was low on both. So yes, running out of gas is an actual thing in Star Wars—although it could have been explained better in the movie.