Undo has been available in the Alt Menu of GBoard for a while. Long press on an editable text field then select Undo in the popup alternative menu (sometimes you need to scroll over or tap the 3 dots to see the full menu choices)
Yeah, I'm thinking that's the case ... maybe it's a tweak to their Android text boxes. That seems like something that's got to be keyboard independent.
The options that you see there are not dependent on your keyboard though. Change your keyboard to something else, and you still see the same options when long pressing a text field.