In this case の is a nominalizer. Basically turns the sentence it precedes into a noun equivalent.
In your example, basically the の turns the part before into "the (thing of) speaking Japanese well" and the part after is just "is difficult". The は in between is just the usual topic particle は (the topic being the whole thing of speaking Japanese well).
You can do so also with other particles, not just は. For example:
<日本語> は むずかしいです。 Japanese is difficult. <日本語を話すの>は むずかしいです。To speak
Japanese is difficult.
<勉強>が好きです。 I like studying. <日本語を勉強するの> が好きです。 I like to study
<たばこ>を やめます。 I quit smoking. <会社でたばこをすうの>を やめます。 I quit smoking in
The examples above are taken from here. Also I just found a possibly related question here on this website.