The commutator subgroup $ [G,G] $ is a normal subgroup of $ G $. And $ G/[G,G]=G^{ab} $ is abelian. So suppose that $ G $ is semisimple and connected. Then $ G^{ab} $ is a semisimple Lie group. So $ G^{ab} $ is abelian and semisimple, thus has trivial Lie algebra. So $ G^{ab} $ has trivial Lie algebra and is connected. So $ G^{ab} $ must be trivial and $ G=[G,G] $ is perfect as desired. Also that means $ [G,G] $ is closed because it is all of $ G $.
The converse is false. There exist Lie groups which are equal to their own commutator subgroup but are not semisimple. Let $ G=SE_n:= \mathbb{R}^n \rtimes SO_n $ be the (special) Euclidean group. Then $ RvR^{-1}v^{-1} $, corresponds to the pure vector element $ R(v)-v $, where $ R $ is pure rotation element and $ v $ is a pure vector element. Consider a rotation $ R $ that takes $ v $ to $ -v $. Then $ R(v)-v=-2v $. Thus we can produce all vectors this way. So $ [G,G] $ contains all the pure vector elements. On the other hand $ [SO_n,SO_n]=SO_n $ for $ n\geq 3 $ so $ [G,G] $ contains all pure rotation elements. But $ G $ is generated by the pure vector elements and the pure rotations elements. Thus $ [G,G] $ must be all of $ G $ for $ n \geq 3 $. $ G $ is clearly not semisimple since $ \mathbb{R}^n $ is a normal solvable subgroup.