“We need to be equipped and prepared against cyber attacks,” Iranian state media quoted Mr Raisi as saying.
“Some people intend to make our nation angry by creating disorder and disruption in their lives,” he said without elaborating.
Iran's oil minister Javad Owji said 3,000 of the 4,300 gas stations affected across the country had resumed normal activities.
The cyber attack came just a few weeks before the second anniversary of bloody protests in Iran. The 2019 demonstrations were brought on by a sudden increase in fuel prices and led to some of the bloodiest protests the country had seen in decades.
The day after the cyber attack, Mr Raisi visited a petrol station in the capital and spoke to workers.
In the past, Tehran has blamed the US and Israel for a series of online assaults. In July, the website of the transport ministry was taken down by what state media said was a “cyber disruption".
The same month, Iran's train services were delayed by apparent cyber attacks, with hackers posting the phone number of supreme leader Ayatollah Ali Khamenei's office as the number to call for information. This time hackers posted the number for a sharia hotline linked to the supreme leader's office.