Transcranial direct current stimulation (tDCS) has emerged as an appealing rehabilitative approach to improve brain function, with promising data on gait and balance in people with multiple sclerosis (MS). However, single variable weights have not yet been adequately assessed. Hence, the aim of this pilot randomized controlled trial was to evaluate the tDCS effects on balance and gait in patients with MS through a machine learning approach. In this pilot randomized controlled trial (RCT), we included people with relapsing–remitting MS and an Expanded Disability Status Scale >1 and <5 that were randomly allocated to two groups—a study group, undergoing a 10-session anodal motor cortex tDCS, and a control group, undergoing a sham treatment. Both groups underwent a specific balance and gait rehabilitative program. We assessed as outcome measures the Berg Balance Scale (BBS), Fall Risk Index and timed up-and-go and 6-min-walking tests at baseline (T0), the end of intervention (T1) and 4 (T2) and 6 weeks after the intervention (T3) with an inertial motion unit. At each time point, we performed a multiple factor analysis through a machine learning approach to allow the analysis of the influence of the balance and gait variables, grouping the participants based on the results. Seventeen MS patients (aged 40.6 ± 14.4 years), 9 in the study group and 8 in the sham group, were included. We reported a significant repeated measures difference between groups for distances covered (6MWT (meters), p < 0.03). At T1, we showed a significant increase in distance (m) with a mean difference (MD) of 37.0 [−59.0, 17.0] (p = 0.003), and in BBS with a MD of 2.0 [−4.0, 3.0] (p = 0.03). At T2, these improvements did not seem to be significantly maintained; however, considering the machine learning analysis, the Silhouette Index of 0.34, with a low cluster overlap trend, confirmed the possible short-term effects (T2), even at 6 weeks. Therefore, this pilot RCT showed that tDCS may provide non-sustained improvements in gait and balance in MS patients. In this scenario, machine learning could suggest evidence of prolonged beneficial effects.