Youngster Munir El Haddadi hit the woodwork as did Andres Iniesta before Messi made the breakthrough, turning well in the box and slotting in after 42 minutes.
Barca’s job was complicated with Javier Mascherano sent off for bringing down Garry Rodrigues a minute later but Munir, drafted into the side as a replacement for the injured Neymar, clipped home to make it 2-0 shortly after the restart.
Messi, whose Argentina side were beaten in the World Cup final by Germany in July, was the talisman once again for Barca.
He made space for himself on the edge of the area and found the back of the net again after 63 minutes.
The result handed Luis Enrique a promising start with Barcelona after the club failed to win any major trophy last season under Gerardo Martino.
“I’ve always said that Messi is the best player in the world in all the ways that you want to look at it,” Luis Enrique told a news conference.
“If Messi wanted to be a defender he would be the best in the world defending. We have seen him do more difficult things in training and he will keep being the best in the world as long as he wants to be.
“The game was made more difficult with the sending off and the team had to respond by playing a bit deeper but with the team we have and Messi in form it worked out.”
Luis Enrique put his confidence in youth with Munir and Rafinha given a chance in attack alongside Messi. It was a sign of veteran Xavi’s changing role in the side that he was on the bench with new signing Ivan Rakitic taking his place and the Croat slotted in effortlessly in the midfield.
It was the usual Barca style with more pace than they showed for much of last season but they found it difficult to break down a well-organised Elche.
Munir has looked sharp during pre-season and his quick movement and shot almost gave Barca the lead midway through the first half but his effort came back off the crossbar.
Iniesta also struck the woodwork from 25 metres and Dani Alves failed to hit the target from inside the area before Messi gave them the lead.
Mascherano’s dismissal for upending Rodrigues as last man did not unsettle Barca and having quickly got their second from Munir they never looked back.
Messi was found by Alves and he toyed with the Elche defenders, looking to go one way then the other, before picking his spot to complete the scoring.
In other matches, Eibar made their debut in the top flight with a 1-0 victory over neighbours Real Sociedad with Javi Lara scoring the only goal before halftime.
Joaquin Larrivey, Fabian Orellana and Nolito gave Celta Vigo a 3-1 victory over Getafe whose only reply came from Jorge Sammir.
Villarreal beat derby rivals Levante 2-0 with second half goals from Ikechukwu Uche and Denis Cheryshev.
Champions Atletico Madrid begin their title defence on Monday at Rayo Vallecano having lifted the Super Cup on Friday with a 2-1 aggregate win over Real Madrid, who host Cordoba in their La Liga bow on Monday.
(Editing by Mark Meadows)