An ECG paper functions as a specialized gridded paper used to visually record the electrical activity of the heart, allowing healthcare professionals to analyze the heart's rhythm and electrical impulses by displaying them as a traceable pattern on the paper, helping to diagnose potential heart conditions like arrhythmias or heart damage.