Prime Minister Viktor Orban has adopted staunchly anti-migrant positions to try and win back supporters from the far right, which is making significant gains.
In a speech last week, James Comey had linked the two countries to the killing of Jews during the Holocaust. They have both said the killings occurred when they were occupied by the Nazis.
Hungary's national gas operator says the "indefinite" cutoff is over domestic supply concerns, but the move comes just days after the CEO of Russia's Gazprom monopoly visited Budapest.