Messi's third-minute goal saw him become the first player to score in the Champions League in 15 consecutive seasons, but it did not pave the way for a convincing performance from Ernesto Valverde's side.
Indeed, Barca relied on a huge slice of luck to retake the lead following Jan Boril's equaliser, with Peter Olayinka deflecting in Luis Suarez's effort from a Messi free-kick.
Though Suarez and Messi subsequently squandered gilt-edged chances to wrap up the points, Olayinka's own goal proved enough to take the wind out of Slavia's sails as Barca moved three points clear at the top of the group.
With the help of some dismal Slavia defending, Barca wasted little time in hitting its stride – Messi tucking home after exchanging passes with Arthur.
Marc-Andre ter Stegen reacted brilliantly to keep out Jaroslav Zeleny's close-range effort as the host responded well, yet Suarez should have extended Barca's lead before the half-hour mark.
With Ter Stegen having pulled off two fine saves prior to half-time, Slavia got the equaliser after the break as left-back Boril charged into the area and prodded in.
Slavia's hard work was undone seven minutes later – Suarez bundling home from an improbable angle via Olayinka's deflection.
Messi would have doubled his tally soon after if not for Ondrej Kolar, before Suarez fired wide when one-on-one with Slavia's goalkeeper.
Suarez's blushes looked set to be spared when Messi met Jordi Alba's cross, only for the captain to inexplicably slice over from point-blank range, though Barca was ultimately not made to pay for its deficiencies in front of goal despite a late Slavia onslaught.