The decision to execute A.K.Gastev came from the very top. Quoting from
the article "Central Institute of Labour" from the materials of the International Memorial, aka Мемориал,
Согласно исследованию А. Ткаченко-Гастева, правнука А. К. Гастева, решение о казни основателя ЦИТа связано с постановлением Политбюро от 8 апреля 1939 года расстрелять 198 руководителей «право-троцкистской, заговорщической организации» (Ткаченко-Гастев А. Последние месяцы жизни Алексея Капитоновича Гастева в материалах его следственного дела в Центральном Архиве ФСБ). Приговор привели в исполнение на полигоне «Коммунарка» 15 апреля 1939 года.
According to the study by A. Tkachenko-Gastev, the great-grandson of A. K. Gastev, the execution of the founder of the Central Institute of Labor [Gastev] was a part the resolution of the Politburo of the Soviet Communist Party dated April 8, 1939, to execute the 198 leaders of the "Trotskyite-Rightist conspiracy."
The given reference is
A. Tkachenko-Gastev, "Last months of life of Alexei Kapitonovich Gastev according to the materials of his file in the Central Archives of the FSB."
The link to this reference is, unfortunately, broken, so I cannot say what else is there. Things are clarified a bit by the article "Поэт машинерии":
Но не ЦИТом единым жил Гастев. Увлечённый театрал и книгочей, известный литератор, яркий талант, он притягивал к себе многих незаурядных личностей. В его большой квартире недалеко от дома на Набережной всегда было много молодёжи. Вечерами приезжали артисты и писатели, часто звучала музыка и раздавался смех. С удовольствием приходили на огонёк Николай Бухарин и Алексей Рыков, а с лидером профсоюзов Михаилом Томским Алексей Капитонович очень близко дружил долгие годы. Кто бы мог тогда подумать, что знакомство с этими людьми, позже объявленными врагами народа, как бы вручит Гастеву «чёрную метку» и явится одной из причин обвинения его в правом уклоне. И приведёт сначала к аресту (7 сентября 1938 года), а затем и к расстрелу (15 апреля 1939 года).
According to the article, Gastev was a close friend of Mikhail Tomsky, one of the three main "leaders of the rightist opposition" and, to a lesser degree, of the two other "leaders," Bukharin and Rykov. This alone would have warranted (in Stalin's mind) Gastev's inclusion in the execution list. (Tomsky, a former head of the Soviet Trade Unions, committed suicide in 1936 once he realized where things are headed, while Bukharin and Rykov were executed after the 3rd Moscow show-trial in 1938.)
Other possible reasons are of the more ideological sorts, including the well-documented (see the same Memorial article) criticism of the Central Institute of Labour for its "lack of ideology" as well as the incompatibility of the central tenets of Gastev's scientific labour theory with the "Stakhanovite movement" (which empathized "heroic accomplishments by individual workers"). However, in my opinion, these would have been secondary reasons. Another possible reason would have been Gastev's correspondence with Henry Ford (which, alone, would have likely resulted in a sentence to Gulag under the article "Suspicion of Espionage," rather than in an immediate execution).
Edit: This is to explain the origin of the "Trotskyite-Rightist conspiracy" that Gastev was accused of taking part in.
Stalin's Great Terror or Great Purge was a multi-faceted affair, but one aspect of it was a conclusion of the intra-party fight from the 1920s. The main four factions of the fight were:
The first two groups are usually described as "leftists" (in the Communist taxonomy of the period), they stood, among other things, for an early termination of NEP (New Economic Policy). Stalin first allied himself with KZ+BRT agains T, then with BRT against the "leftists" (the block of ZK+T) and, lastly, once the leftists were defeated, turned against the BRT group.
From this viewpoint, the notion of a "Trotskyite-Rightist" conspiracy makes very little sense, since can be as well described as a "Left-Right" conspiracy against the "Center." There is an interesting historic debate on whether a "Left-Right block" actually existed in the early 1930s, see the discussion in this and this Wikipedia articles. The evidence is quite thin: Some letters from Trotsky urging for such a block plus attempts of various left and right groups in the underground Communist opposition to Stalin's rule to share information.
Regardless, the three Moscow show-trials,
the Case of the Trotskyite-Zinovievite Terrorist Center (Zinoviev-Kamenev Trial, or the "Trial of the Sixteen;" 1936);
the Case of the Anti-Soviet "Parallel" Trotskyist Center (Pyatakov-Radek Trial; 1937);
the Case of the Anti-Soviet "Bloc of Rightists and Trotskyites" (Bukharin-Rykov Trial, or "Trial of the Twenty-One;" 1938), where some accused were "Rightists", some were "Leftists" (e.g. Krestinsky and Rakovsky), and some neither (e.g. a former NKVD boss, Yagoda)
meant to present to the (bewildered) Soviet population and international observers a coherent picture of a vast counter-revolutionary conspiracy with Trotsky at its center, whose members,
plotted the overthrow and territorial partition of the Soviet Union in collusion with agents of the German and Japanese governments,
see here.
Now, lumping together party members (even marginally) affiliated with the Left or Right opposition made perfect sense.