No. The Jackson 5 did not perform "Welcome to the 60's" from the 1988 Hairspray soundtrack.
The Jackson 5's Motown sound and era (late 60s/early 70s) align with Hairspray's 1962 Baltimore setting. But they were never involved in the film or soundtrack. The Dynamites were created for the movie as a Supremes/Jackson 5-type act.