Trail running and road running are very different and this will definitely have an affect on your speed. The biggest difference between the two terrains is that trail running poses many obstacles to the runner, while roads are... well... flat. On a trail, you will encounter more inclines and declines, and will also have to navigate around, over, and under natural obstacles like rocks, roots, and streams, among others. There may also be varying widths of trail that will affect how quickly you are able to pass through a specific section.
The best way to keep your pace is on a trail run is to use a GPS-based tracker, like a running watch or a smart phone app. Or, if you prefer not to use such technology, you can simply make note of the start and end times of your run.
http://www.rockcreekrunner.com/2012/11/02/trail-running-basics/itness/beginners-guide-trail-running/
http://www.blueridgeoutdoors.com/go-outside/the-pros-cons-of-road-running-vs-trail-running/