I'm also new at this but I think you can mark the ends of the restricted section by adding barrier=bollard (or barrier=gate, or whatever seems best), access=official, foot=yes to nodes at either end of the restricted area.
http://taginfo.openstreetmap.org/keys/barrier#values
http://wiki.openstreetmap.org/wiki/Barriers
http://wiki.openstreetmap.org/wiki/Key:access
You might also want to split the way and add a surface=unpaved for the dirt section too.
I'm also new at this but I think you can mark the ends of the restricted section by adding barrier=bollard (or barrier=gate, or whatever seems best), access=official, foot=yes to nodes at either end of the restricted area.
http://taginfo.openstreetmap.org/keys/barrier#values
http://wiki.openstreetmap.org/wiki/Barriers
http://wiki.openstreetmap.org/wiki/Key:access
You might also want to split the way and add a surface=unpaved for the dirt section too.