The Motor Sports Association (MSA) agreed deals in England and Scotland, but talks had stalled with NRW.
The body had said it needed to ensure organisers covered the cost of repairing forestry roads afterwards.
There were fears rallying may have to stop in Wales if a deal could not be reached.
Talks are continuing over stage rally mileage charges with other parties.
Wales hosts several competitions with Wales Rally GB including the final round of the FIA World Rally Championship (WRC), the most high profile with stages in Powys, Gwynedd and Denbighshire last year.
A national rally stage in Wales costs about Â£500 to enter, with organisers needing about 80 competitors to break even.
Popular forest roads in Hafren, Myherin, Clocaenog and Dyfi are all looked after by NRW and will feature in the UK round of the FIA World Rally Championship next month.
Tim Jones of NRW said: "The forest roads we look after have achieved almost legendary status in the world of rallying."
He said he hoped the new access agreement would send a positive message to the rallying community.
Rob Jones, MSA Chief Executive, said: "[The agreement] forms the essential platform for us to continue to focus on mileage charges and the wider partnership between our two organisations."
A three-year deal has been struck with Natural Resources Wales over the use of forests for Wales Rally GB events.