Hi! You just have to create 2 tweens and play them.
local tw = game:GetService("TweenService")
local gate1 = "define your part here"
local gate2 = "define your part here"
local a = tw:Create(gate1, TweenInfo.new(arguments here), {Position += Vector3.new(0,0,10) or on whatever axis it is})
local b = tw:Create(gate2, TweenInfo.new(arguments here), {Position += Vector3.new(0,0,-10) or on whatever axis it is})
a:Play()
b:Play()
Hope it helps!