The agreement follows a visit last month by Pakistan's new Prime Minister Imran Khan to the Gulf kingdom as he seeks to attract foreign investment.
The Saudis "have shown interest that they want to immediately invest in (the) refinery", petroleum minister Sarwar Khan said.
"This has been agreed from both sides."
The agreement is set to be signed between Pakistan State Oil (PSO) company and Riyadh's state oil giant Saudi Aramco.
Gwadar's port is being developed as part of the $60 bn China-Pakistan Economic Corridor (CPEC), an ambitious plan to build energy and transport links connecting the western Chinese region of Xinjiang with the Arabian Sea via Pakistan, as part of Beijing's broader Belt and Road initiative.