Common Gate Interface
Short for 'Common Gate Interface'. Now obsolete.
At the time (early internet - 1990-2000) there had to be a way to run server side programs on the request of an internet client to return some result.
CGI on the server allowed this to happen, But it was utterly inefficient. Every web request triggered a program to run. This is fine with a few thousand requests, but is a burden with a few million requests.
And so CGI was superseded by server code such as php and node.js