A gimmick build is derogatory term for a build that uses a particular odd and often overpowered combination of skill and circumstances to achieve its victory condition. The popular gimmick builds tend to be very effective, and are often candidates for skill rebalancing. For example, the EoE Bomb build is a classic gimmick build that required the entire team to kill themselves as fast as possible to activate Edge of Extinction. However, with the change to Edge of Extinction that prevents damage on foes at full health, this build is now entirely obsolete.
Gimmick builds are always counterable, but in most cases the counter for the gimmick requires sacrificing key elements that would be necessary to face more balanced teams.
To a certain extent, whether a build is a gimmick build or not is a matter of opinion. In competitive games, players play to win, and any legal build is a valid strategy.