The units will provide assessment and treatment for people with urgent but non-emergency medical problems, where patients need to be seen the same day but do not require hospital care.
Speaking as he visited the Wester Hailes site, Gray said he was “determined to keep driving forward improvements” in the NHS.
“Walk-in services will make it easier to access urgent care on the day it’s needed, while easing pressure on GP practices and hospitals.”
The new centres will be open seven days per week between 12:00 and 20:00.
Tracey McKigen, director of primary care at NHS Lothian, said the health board was “working closely” with the Scottish government, Edinburgh Health and Social Care Partnership and the Wester Hailes Healthy Living Centre to deliver the new service.
She said: “While plans are still being refined, we believe the new service will help improve access to primary care and complement existing local health services.”