A statement from organisers said he was pronounced dead in hospital having earlier been found unconscious after suffering a cardiac arrest.
“The entire Dakar caravan would like to extend its sincere condolences to his friends and family,” it said.
The event, once known as the Paris-Dakar Rally, is being held in Saudi Arabia for the first time, having spent a decade in South America following a switch from its original Saharan African route because of security concerns.
Scores of riders, drivers and crew – including two-time Formula 1 world champion Fernando Alonso – are competing in various vehicles over 12 stages.
Goncalves, the 2013 cross-country rallies world champion, was taking part in his 13th Dakar Rally and was runner-up to Marc Coma five years ago.
Riding for Hero Motorsports Team Rally, he had been in 46th place overall going into the seventh stage from Riyadh to Wadi Al Dawasi.
A helicopter arrived with the rider eight minutes after organisers were alerted to the crash, but he was pronounced dead at Layla Hospital.
Goncalves is the first competitor to die in the gruelling endurance event since Polish motorcycle rider Michal Hernik in Argentina in 2015.
Last week, British motorcyclist Sam Sunderland retired injured after injuring his back and shoulder in a crash on the fifth stage.
Sunderland, 30, became the only Briton to win any class in the 42-year history of the Dakar rally on the bike in 2017.
Source: BBC Sports