Ramaala, who turns 40 next week, clocked two hours, 12 minutes, 12 seconds (2:12.12) to better the IAAF A standard for the London Games by nearly three minutes.
Running conservatively, with his sole intention to qualify for the global sporting showpiece, Ramaala went through the halfway mark in 1:05.21.
While he slowed a little in the second half, and finished more than seven minutes behind Ethiopian winner Ayele Abshero, he comfortably achieved his goal.
Ramaala made his Olympic debut at the Atlanta Games in 1996, at the age of 24, when he was eliminated in the heats of the men's 10,000 metres.
Four years later, in Sydney, only six months after making his debut over the classic 42.2km distance, he finished 12th in the marathon event.
Ramaala failed to finish the marathon at the Athens Games in 2004, among 21 runners who dropped out in challenging conditions, and in Beijing four years ago he trailed home in 44th place.
The second fastest South African over the marathon - with a personal best of 2:06.55 set at the London Marathon in 2006 - Ramaala's performance in Dubai was his fastest in nearly three years.
Leading results on Friday in the Dubai Marathon:
Men
1. Ayele Abshero, Ethiopia, 2 hours, 4 minutes, 23 seconds
2. Dino Sefir Kemal, Ethiopia, 2:04:50
3. Markos Geneti, Ethiopia, 2:04:54
4. Jonathan Maiyo, Kenya, 2:04:56
5. Tadesse Tola, Ethiopia, 2:05:10
6. Yami Dadi, Ethiopia, 2:05:41
7. Abdullah Shami Dawit, Ethiopia, 2:05:42
8. Deressa Chimsa Edea, Ethiopia, 2:05:42
9. Seboka Tola, Ethiopia, 2:067:17
10.Yemane Adhane, Ethiopia, 2:06:29
Women
1. Aselefech Mergia, Ethiopia, 2:19:31
2. Lucy Kabuu, Kenya, 2:19:34
3. Mare Dibaba, Ethiopia, 2:19:52
4. Bezunesh Bekele Sertsu, Ethiopia, 2:20:30
5. Aberu Shewaye, Ethiopia, 2:20:33
6. Lydia Cheromei, Kenya, 2:21:30
7. Sharon Cherop Jemutai, Kenya, 2:22:39
8. Atsed Tesema, Ethiopia, 2:23:13
9. Mamitu Molisa, Ethiopia, 2:24:24
10.Isabella Andersson, Sweden, 2:25:41