Gomoku is an example of what mathematicians call an (m,n,k)-game. It's called that you have a board of size m by n, and your objective is to get k in a row. So, for example, tic-tac-toe is a (3,3,3)-game.
Based on combinatorial game theory, the second player can never win with optimal play, regardless of m, n, or k. This can be shown via what is known as a "strategy-stealing argument": if the second player has a winning strategy, the first player can make a meaningless move, and pretend to be the second player and follow that strategy. If that meaningless move becomes meaningful later on, then the first player can make another meaningless move and continue with that strategy. Since any move by the first player, however meaningless, can only improve the chances of them winning, this is basically a winning strategy for the first player, contradicting the fact that the second player has a winning strategy. (Note that this is a "broad strokes" explanation; math is rigorous and is full of minor details too wordy to repeat here.)