Paolo Gentiloni delivered the invitation from Italian Prime Minister Matteo Renzi, Rouhani's website reported, a week after France asked the moderate president to visit Paris in November.
Rouhani said he “hoped to visit Italy, which enjoys an ancient civilisation and culture, at the proper time”.
Several senior diplomats have shuttled in and out of Iran since July 14th, when Tehran, after years of negotiations, struck an agreement with six world powers over its nuclear programme.
“We can use the atmosphere after this agreement to the benefit of both sides and the European Union,” Rouhani said in a meeting with Italian ministers and business leaders on Wednesday.
“Today, there are numerous grounds for Iran to attract foreign investments.”
The nuclear deal, which will see economic sanctions lifted after years of poor relations with the West, has sparked a flurry of interest from countries seeking to deal with the Islamic republic.
Iranian Economy Minister Ali Tayebnia said that trade with Italy stood at $7 billion (€6.4 billion) a year before sanctions were introduced.
“That number had dropped to $1.5 billion due to the restrictions,” he was quoted as saying by Iranian news sites.
“We should try to reach our past historical record” of economic cooperation, he added.
Tayebnia said Italy had agreed to buy Iranian oil once sanctions were lifted.
Foreign Minister Mohammad Javad Zarif, who led the negotiations with world powers, met Gentiloni on Tuesday.
The Italian told his counterpart he hoped the historic nuclear agreement would serve as “a successful example for resolving differences,” the IRNA official news agency reported.
Italy's economic development minister Federica Guidi met on Wednesday in Tehran with Iranian trade and industry minister Mohammad Reza Nematzadeh, it added.