Besides the recommendations, those using Google Messages can select GIFs by tapping the "+" button to the left of the text field. This allows users to select an emoji, search for a GIF, find a sticker, send or request a GPay money transfer and more. The GIFs used in the search and recommendartions are provided by Tenor, which has a large library of such images.

The Google Messages app now makes GIF recommendations
Google's Gboard QWERTY app also has a similar feature that was tested last September and is now part of the app. If the name of a person, place or thing with a relevant search is typed, the search icon will show up in the circle to the left of the suggestion bar where the Google "G" logo usually is found. Tap on that icon (the magnifying glass) and you'll see a small search card that you can expand to full size. If you type something with a relevant GIF, the words GIF will appear in the circle. Tap on it to see GIF suggestions related to the topic. This feature must be toggled on by going to Gboard Settings > Search > Toggle on "Show search and More" button.
GIF recommendations on Gboard
ncG1vNJzZmivp6x7sbTOp5yaqpWjrm%2BvzqZmp52nqHyIu86go55lfZrAtK3Gnqpmq6WctKa%2F06xkgIF2qHqjrdKem2annmKubr7EmqNmrJmism6vzqetnqqjlsGqu82YoJ1pYWqGcoE%3D