Discussing gas density is slightly more complex than discussing solid/liquid density. Since gas volume is VERY responsive to temperature and pressure, these two factors must be included in EVERY gas density discussion.
By the way, solid and liquid volumes are responsive to temperature and pressure, but the response is so little that it can usually be ignored in introductory classes.
So, for gases, we speak of "standard gas density." This is the density of the gas (expressed in grams per liter) at STP. If you discuss gas density at any other set of conditions, you drop the word standard and specify the pressure and temperature. Also, when you say "standard gas density," you do not need to add "at STP." STP is part of the definition of the term. It does no harm to say "standard gas density at STP," it just looks a bit silly.
You can calculate the ideal standard gas density fairly easily. Just take the mass of one mole of the gas and divide by the molar volume. For nitrogen, we would have:
28.014 g mol¯1 / 22.414 L mol¯1 = 1.250 g/L
For water, we have:
18.015 g mol¯1 / 22.414 L mol¯1 = 0.8037 g/L
Notice I said "ideal." The behavior of "real" gases diverges from predictions based on ideal conditions. Small gases like H2 at high temperatures approach ideal behavior almost exactly while larger gas molecules (NH3) at low temperatures diverge the greatest amount. These "real" gas differences are small enough to ignore right now, but in later classes they will become important.
The official IUPAC unit for gas density is kg/m3 (not g/L). However, it turns out that one kg/m3 equals one g/L. Here is a brief video explaining the conversion.
One place teachers like to bring gas density into play is when you calculate a molar mass of a gas using PV = nRT.
Example Problem #1: The density of a gas is measured at 1.853 g / L at 745.5 mmHg and 23.8 °C. What is its molar mass?
Solution #1: Convert mmHg to atm and °C to K. Use 1.000 L. Plug into PV = nRT and solve for n. Then divide 1.853 g by n, the number of moles, for your answer.
Solution #2: This solution exploits a rearrangement of the ideal gas law. Here it is:
The answer: 46.008 g mol¯1
Example Problem #2: What is the molar mass of a gas which has a density of 0.00249 g/mL at 20.0 °C and 744.0 mm Hg?
Solution: Convert mmHg to atm (744.0/760.0) and °C to K (20.0 + 273.15). Use 0.001 L (which is 1 mL converted to liters). Plug into PV = nRT and solve for n (the value of which is calculated to be 4.069 x 10¯5 mol).
Then, divide 0.00249 g by the moles just calculated for an answer of 61.2 g/mol.