Those two don't always travel together, and gratitude is the more robust of the pair. Happiness needs conditions. Gratitude operates in worse weather; you can be genuinely thankful for a friend on a day you feel awful.
Which makes it the one to reach for when the other isn't available. Not as a substitute or a consolation, but because it tends to bring happiness along eventually, at its own pace, through a side door. Start smaller than seems worthwhile. A hot shower. The bus arriving. Gratitude scales up from things that sound almost too ordinary to mention, and it very rarely starts from the large ones.