The 40-year-old Hero Motorsports entrant, taking part in his 13th Dakar Rally since making his debut in 2006, fell after 276km of the special stage from the capital Riyadh to Wadi Al Dawasir.
"The organizers received an alert at 10:08 and dispatched a medical helicopter that reached the biker at 10:16 and found him unconscious after going into cardiac arrest," organizers said in a statement.
"Following resuscitation efforts in situ, the competitor was taken by helicopter to Layla Hospital, where he was sadly pronounced dead.
"The entire Dakar caravan would like to extend its sincere condolences to his friends and family."
Goncalves was the first competitor to die in the grueling endurance event since Polish motorcycle rider Michal Hernik in Argentina in 2015.
The Portuguese finished in the top 10 at the Dakar Rally four times and was runner-up in 2015 to Spaniard Marc Coma, who is competing this year as co-driver to double Formula One champion Fernando Alonso.
Goncalves suffered mechanical problems on Friday, having to change his bike's engine to stay in the race, and dropped to 46th overall after the sixth stage.
"The target now is to do my best, because the result at the end ... there is no way to get a good result. Instead I’ll try to do good stages every day possible and that's what I'm looking for," Goncalves said then.
The experienced Portuguese had competed in the Dakar on three continents, from its origins in Africa to South America and this year's debut in the Middle East.
The 2013 cross country rallies world champion was representing the Indian Hero Motorsports team, along with his brother-in-law Joaquim Rodrigues, after five years racing with Honda.
Goncalves crashed out on the fifth stage in Peru last year. Rodrigues broke his back in a Dakar crash two years ago but returned after extensive surgery and was 27th after stage six.
Sunday's 546km stage, the longest of the event, was ultimately won by Argentina's KTM rider Kevin Benavides who stopped to help Goncalves but had the lost time reinstated.
American Ricky Brabec extended his overall lead in the category.
Australian Toby Price, the defending motorcycle champion, also had lost time reinstated after assisting Goncalves and ended the day in fourth position, 28 minutes off the lead.
Spaniard Carlos Sainz, a two-times Dakar winner driving a Mini buggy, took his third stage win of the event in the cars category to extend his lead over Toyota's reigning champion Nasser Al-Attiyah of Qatar to 10 minutes.
Mini have now won six of the seven stages.