You need to knit more than just the 19 stitches and 25 rows. Stockinette likes to curl on the side edges in one direction and the cast on and off edges in the other. I would cast on at least 30 stitches. Knit 3 or 4 rows in garter stitch before switching to stockinette. Then knit the at least 30 rows of the stockinette as follows: RS knit, WS k3, purl to 3 from end, k3. Then knit another 3 or 4 rows in garter stitch. That way the swatch doesn't roll up and you have a good size sample in the middle to measure. Place a ruler along a row and count the number of stitches to 4 inches then do the same for the rows.
If your pattern just goes by how many inches around and inches tall, the gauge doesn't matter much. But it will give you an idea how many stitches to cast on and how many rows you'll need to knit to get a good size hat out of it.