Google Analytics code is usually loaded locally and it records and sends to the Google servers various user actions or events.
If you know the destination of those servers, you can send extra actions to log via simple HTTP requests, which almost any mature programming language can mimic, and especially Ruby in this case.
The Gabba library allows developers to log various actions to a Google Analytics account from the server-side (where Ruby is executed) and not from the client's side (where the application gets loaded).
Why would someone do this and how it's useful? It allows developers to log details not supported by default in Google Analytics (via custom GA variables).
It also additionally allows a better logging of real page views, recording every time the page has been requested from the server, instead of logging how many times it has been loaded properly on the client's side.